<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables,
             MagicHash, BangPatterns #-}</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Module      :  Data.List</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Copyright   :  (c) The University of Glasgow 2001</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- License     :  BSD-style (see the file libraries/base/LICENSE)</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Stability   :  stable</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-14"></span><span class="hs-comment">--</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- Operations on lists.</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.OldList</span><span>
</span><span id="line-20"></span><span>   </span><span class="hs-special">(</span><span>
</span><span id="line-21"></span><span>   </span><span class="annot"><span class="hs-comment">-- * Basic functions</span></span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span>     </span><span class="annot"><a href="GHC.Base.html#%2B%2B"><span class="hs-operator">(++)</span></a></span><span>
</span><span id="line-24"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#head"><span class="hs-identifier">head</span></a></span><span>
</span><span id="line-25"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#last"><span class="hs-identifier">last</span></a></span><span>
</span><span id="line-26"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#tail"><span class="hs-identifier">tail</span></a></span><span>
</span><span id="line-27"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#init"><span class="hs-identifier">init</span></a></span><span>
</span><span id="line-28"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#uncons"><span class="hs-identifier">uncons</span></a></span><span>
</span><span id="line-29"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#singleton"><span class="hs-identifier">singleton</span></a></span><span>
</span><span id="line-30"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#null"><span class="hs-identifier">null</span></a></span><span>
</span><span id="line-31"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#length"><span class="hs-identifier">length</span></a></span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span>   </span><span class="annot"><span class="hs-comment">-- * List transformations</span></span><span>
</span><span id="line-34"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#map"><span class="hs-identifier">map</span></a></span><span>
</span><span id="line-35"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#reverse"><span class="hs-identifier">reverse</span></a></span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#intersperse"><span class="hs-identifier">intersperse</span></a></span><span>
</span><span id="line-38"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#intercalate"><span class="hs-identifier">intercalate</span></a></span><span>
</span><span id="line-39"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#transpose"><span class="hs-identifier">transpose</span></a></span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#subsequences"><span class="hs-identifier">subsequences</span></a></span><span>
</span><span id="line-42"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#permutations"><span class="hs-identifier">permutations</span></a></span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span>   </span><span class="annot"><span class="hs-comment">-- * Reducing lists (folds)</span></span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#foldl"><span class="hs-identifier">foldl</span></a></span><span>
</span><span id="line-47"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#foldl%27"><span class="hs-identifier">foldl'</span></a></span><span>
</span><span id="line-48"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#foldl1"><span class="hs-identifier">foldl1</span></a></span><span>
</span><span id="line-49"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#foldl1%27"><span class="hs-identifier">foldl1'</span></a></span><span>
</span><span id="line-50"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#foldr"><span class="hs-identifier">foldr</span></a></span><span>
</span><span id="line-51"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#foldr1"><span class="hs-identifier">foldr1</span></a></span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span>   </span><span class="annot"><span class="hs-comment">-- ** Special folds</span></span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#concat"><span class="hs-identifier">concat</span></a></span><span>
</span><span id="line-56"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#concatMap"><span class="hs-identifier">concatMap</span></a></span><span>
</span><span id="line-57"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#and"><span class="hs-identifier">and</span></a></span><span>
</span><span id="line-58"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#or"><span class="hs-identifier">or</span></a></span><span>
</span><span id="line-59"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#any"><span class="hs-identifier">any</span></a></span><span>
</span><span id="line-60"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#all"><span class="hs-identifier">all</span></a></span><span>
</span><span id="line-61"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#sum"><span class="hs-identifier">sum</span></a></span><span>
</span><span id="line-62"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#product"><span class="hs-identifier">product</span></a></span><span>
</span><span id="line-63"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#maximum"><span class="hs-identifier">maximum</span></a></span><span>
</span><span id="line-64"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#minimum"><span class="hs-identifier">minimum</span></a></span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span>   </span><span class="annot"><span class="hs-comment">-- * Building lists</span></span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span>   </span><span class="annot"><span class="hs-comment">-- ** Scans</span></span><span>
</span><span id="line-69"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#scanl"><span class="hs-identifier">scanl</span></a></span><span>
</span><span id="line-70"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#scanl%27"><span class="hs-identifier">scanl'</span></a></span><span>
</span><span id="line-71"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#scanl1"><span class="hs-identifier">scanl1</span></a></span><span>
</span><span id="line-72"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#scanr"><span class="hs-identifier">scanr</span></a></span><span>
</span><span id="line-73"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#scanr1"><span class="hs-identifier">scanr1</span></a></span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span>   </span><span class="annot"><span class="hs-comment">-- ** Accumulating maps</span></span><span>
</span><span id="line-76"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#mapAccumL"><span class="hs-identifier">mapAccumL</span></a></span><span>
</span><span id="line-77"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#mapAccumR"><span class="hs-identifier">mapAccumR</span></a></span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span>   </span><span class="annot"><span class="hs-comment">-- ** Infinite lists</span></span><span>
</span><span id="line-80"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#iterate"><span class="hs-identifier">iterate</span></a></span><span>
</span><span id="line-81"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#iterate%27"><span class="hs-identifier">iterate'</span></a></span><span>
</span><span id="line-82"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#repeat"><span class="hs-identifier">repeat</span></a></span><span>
</span><span id="line-83"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#replicate"><span class="hs-identifier">replicate</span></a></span><span>
</span><span id="line-84"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#cycle"><span class="hs-identifier">cycle</span></a></span><span>
</span><span id="line-85"></span><span>
</span><span id="line-86"></span><span>   </span><span class="annot"><span class="hs-comment">-- ** Unfolding</span></span><span>
</span><span id="line-87"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#unfoldr"><span class="hs-identifier">unfoldr</span></a></span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span>   </span><span class="annot"><span class="hs-comment">-- * Sublists</span></span><span>
</span><span id="line-90"></span><span>
</span><span id="line-91"></span><span>   </span><span class="annot"><span class="hs-comment">-- ** Extracting sublists</span></span><span>
</span><span id="line-92"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#take"><span class="hs-identifier">take</span></a></span><span>
</span><span id="line-93"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#drop"><span class="hs-identifier">drop</span></a></span><span>
</span><span id="line-94"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#splitAt"><span class="hs-identifier">splitAt</span></a></span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#takeWhile"><span class="hs-identifier">takeWhile</span></a></span><span>
</span><span id="line-97"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#dropWhile"><span class="hs-identifier">dropWhile</span></a></span><span>
</span><span id="line-98"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#dropWhileEnd"><span class="hs-identifier">dropWhileEnd</span></a></span><span>
</span><span id="line-99"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#span"><span class="hs-identifier">span</span></a></span><span>
</span><span id="line-100"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#break"><span class="hs-identifier">break</span></a></span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#stripPrefix"><span class="hs-identifier">stripPrefix</span></a></span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#group"><span class="hs-identifier">group</span></a></span><span>
</span><span id="line-105"></span><span>
</span><span id="line-106"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#inits"><span class="hs-identifier">inits</span></a></span><span>
</span><span id="line-107"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#tails"><span class="hs-identifier">tails</span></a></span><span>
</span><span id="line-108"></span><span>
</span><span id="line-109"></span><span>   </span><span class="annot"><span class="hs-comment">-- ** Predicates</span></span><span>
</span><span id="line-110"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#isPrefixOf"><span class="hs-identifier">isPrefixOf</span></a></span><span>
</span><span id="line-111"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#isSuffixOf"><span class="hs-identifier">isSuffixOf</span></a></span><span>
</span><span id="line-112"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#isInfixOf"><span class="hs-identifier">isInfixOf</span></a></span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span>   </span><span class="annot"><span class="hs-comment">-- * Searching lists</span></span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span>   </span><span class="annot"><span class="hs-comment">-- ** Searching by equality</span></span><span>
</span><span id="line-117"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#elem"><span class="hs-identifier">elem</span></a></span><span>
</span><span id="line-118"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#notElem"><span class="hs-identifier">notElem</span></a></span><span>
</span><span id="line-119"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#lookup"><span class="hs-identifier">lookup</span></a></span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span>   </span><span class="annot"><span class="hs-comment">-- ** Searching with a predicate</span></span><span>
</span><span id="line-122"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#find"><span class="hs-identifier">find</span></a></span><span>
</span><span id="line-123"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#filter"><span class="hs-identifier">filter</span></a></span><span>
</span><span id="line-124"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#partition"><span class="hs-identifier">partition</span></a></span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span>   </span><span class="annot"><span class="hs-comment">-- * Indexing lists</span></span><span>
</span><span id="line-127"></span><span>   </span><span class="hs-comment">-- | These functions treat a list @xs@ as a indexed collection,</span><span>
</span><span id="line-128"></span><span>   </span><span class="hs-comment">-- with indices ranging from 0 to @'length' xs - 1@.</span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#%21%21"><span class="hs-operator">(!!)</span></a></span><span>
</span><span id="line-131"></span><span>
</span><span id="line-132"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#elemIndex"><span class="hs-identifier">elemIndex</span></a></span><span>
</span><span id="line-133"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#elemIndices"><span class="hs-identifier">elemIndices</span></a></span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#findIndex"><span class="hs-identifier">findIndex</span></a></span><span>
</span><span id="line-136"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#findIndices"><span class="hs-identifier">findIndices</span></a></span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span>   </span><span class="annot"><span class="hs-comment">-- * Zipping and unzipping lists</span></span><span>
</span><span id="line-139"></span><span>
</span><span id="line-140"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#zip"><span class="hs-identifier">zip</span></a></span><span>
</span><span id="line-141"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#zip3"><span class="hs-identifier">zip3</span></a></span><span>
</span><span id="line-142"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#zip4"><span class="hs-identifier">zip4</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#zip5"><span class="hs-identifier">zip5</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#zip6"><span class="hs-identifier">zip6</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#zip7"><span class="hs-identifier">zip7</span></a></span><span>
</span><span id="line-143"></span><span>
</span><span id="line-144"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#zipWith"><span class="hs-identifier">zipWith</span></a></span><span>
</span><span id="line-145"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#zipWith3"><span class="hs-identifier">zipWith3</span></a></span><span>
</span><span id="line-146"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#zipWith4"><span class="hs-identifier">zipWith4</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#zipWith5"><span class="hs-identifier">zipWith5</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#zipWith6"><span class="hs-identifier">zipWith6</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#zipWith7"><span class="hs-identifier">zipWith7</span></a></span><span>
</span><span id="line-147"></span><span>
</span><span id="line-148"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#unzip"><span class="hs-identifier">unzip</span></a></span><span>
</span><span id="line-149"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#unzip3"><span class="hs-identifier">unzip3</span></a></span><span>
</span><span id="line-150"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#unzip4"><span class="hs-identifier">unzip4</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#unzip5"><span class="hs-identifier">unzip5</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#unzip6"><span class="hs-identifier">unzip6</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#unzip7"><span class="hs-identifier">unzip7</span></a></span><span>
</span><span id="line-151"></span><span>
</span><span id="line-152"></span><span>   </span><span class="annot"><span class="hs-comment">-- * Special lists</span></span><span>
</span><span id="line-153"></span><span>
</span><span id="line-154"></span><span>   </span><span class="annot"><span class="hs-comment">-- ** Functions on strings</span></span><span>
</span><span id="line-155"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#lines"><span class="hs-identifier">lines</span></a></span><span>
</span><span id="line-156"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#words"><span class="hs-identifier">words</span></a></span><span>
</span><span id="line-157"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#unlines"><span class="hs-identifier">unlines</span></a></span><span>
</span><span id="line-158"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#unwords"><span class="hs-identifier">unwords</span></a></span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span>   </span><span class="annot"><span class="hs-comment">-- ** \&quot;Set\&quot; operations</span></span><span>
</span><span id="line-161"></span><span>
</span><span id="line-162"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#nub"><span class="hs-identifier">nub</span></a></span><span>
</span><span id="line-163"></span><span>
</span><span id="line-164"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#delete"><span class="hs-identifier">delete</span></a></span><span>
</span><span id="line-165"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#%5C%5C"><span class="hs-operator">(\\)</span></a></span><span>
</span><span id="line-166"></span><span>
</span><span id="line-167"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#union"><span class="hs-identifier">union</span></a></span><span>
</span><span id="line-168"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#intersect"><span class="hs-identifier">intersect</span></a></span><span>
</span><span id="line-169"></span><span>
</span><span id="line-170"></span><span>   </span><span class="annot"><span class="hs-comment">-- ** Ordered lists</span></span><span>
</span><span id="line-171"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#sort"><span class="hs-identifier">sort</span></a></span><span>
</span><span id="line-172"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#sortOn"><span class="hs-identifier">sortOn</span></a></span><span>
</span><span id="line-173"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#insert"><span class="hs-identifier">insert</span></a></span><span>
</span><span id="line-174"></span><span>
</span><span id="line-175"></span><span>   </span><span class="annot"><span class="hs-comment">-- * Generalized functions</span></span><span>
</span><span id="line-176"></span><span>
</span><span id="line-177"></span><span>   </span><span class="annot"><span class="hs-comment">-- ** The \&quot;@By@\&quot; operations</span></span><span>
</span><span id="line-178"></span><span>   </span><span class="hs-comment">-- | By convention, overloaded functions have a non-overloaded</span><span>
</span><span id="line-179"></span><span>   </span><span class="hs-comment">-- counterpart whose name is suffixed with \`@By@\'.</span><span>
</span><span id="line-180"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-181"></span><span>   </span><span class="hs-comment">-- It is often convenient to use these functions together with</span><span>
</span><span id="line-182"></span><span>   </span><span class="hs-comment">-- 'Data.Function.on', for instance @'sortBy' ('compare'</span><span>
</span><span id="line-183"></span><span>   </span><span class="hs-comment">-- \`on\` 'fst')@.</span><span>
</span><span id="line-184"></span><span>
</span><span id="line-185"></span><span>   </span><span class="annot"><span class="hs-comment">-- *** User-supplied equality (replacing an @Eq@ context)</span></span><span>
</span><span id="line-186"></span><span>   </span><span class="annot"><span class="hs-comment">-- | The predicate is assumed to define an equivalence.</span></span><span>
</span><span id="line-187"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#nubBy"><span class="hs-identifier">nubBy</span></a></span><span>
</span><span id="line-188"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#deleteBy"><span class="hs-identifier">deleteBy</span></a></span><span>
</span><span id="line-189"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#deleteFirstsBy"><span class="hs-identifier">deleteFirstsBy</span></a></span><span>
</span><span id="line-190"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#unionBy"><span class="hs-identifier">unionBy</span></a></span><span>
</span><span id="line-191"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#intersectBy"><span class="hs-identifier">intersectBy</span></a></span><span>
</span><span id="line-192"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#groupBy"><span class="hs-identifier">groupBy</span></a></span><span>
</span><span id="line-193"></span><span>
</span><span id="line-194"></span><span>   </span><span class="annot"><span class="hs-comment">-- *** User-supplied comparison (replacing an @Ord@ context)</span></span><span>
</span><span id="line-195"></span><span>   </span><span class="annot"><span class="hs-comment">-- | The function is assumed to define a total ordering.</span></span><span>
</span><span id="line-196"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#sortBy"><span class="hs-identifier">sortBy</span></a></span><span>
</span><span id="line-197"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#insertBy"><span class="hs-identifier">insertBy</span></a></span><span>
</span><span id="line-198"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#maximumBy"><span class="hs-identifier">maximumBy</span></a></span><span>
</span><span id="line-199"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#minimumBy"><span class="hs-identifier">minimumBy</span></a></span><span>
</span><span id="line-200"></span><span>
</span><span id="line-201"></span><span>   </span><span class="annot"><span class="hs-comment">-- ** The \&quot;@generic@\&quot; operations</span></span><span>
</span><span id="line-202"></span><span>   </span><span class="hs-comment">-- | The prefix \`@generic@\' indicates an overloaded function that</span><span>
</span><span id="line-203"></span><span>   </span><span class="hs-comment">-- is a generalized version of a &quot;Prelude&quot; function.</span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#genericLength"><span class="hs-identifier">genericLength</span></a></span><span>
</span><span id="line-206"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#genericTake"><span class="hs-identifier">genericTake</span></a></span><span>
</span><span id="line-207"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#genericDrop"><span class="hs-identifier">genericDrop</span></a></span><span>
</span><span id="line-208"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#genericSplitAt"><span class="hs-identifier">genericSplitAt</span></a></span><span>
</span><span id="line-209"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#genericIndex"><span class="hs-identifier">genericIndex</span></a></span><span>
</span><span id="line-210"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.OldList.html#genericReplicate"><span class="hs-identifier">genericReplicate</span></a></span><span>
</span><span id="line-211"></span><span>
</span><span id="line-212"></span><span>   </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-213"></span><span>
</span><span id="line-214"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Maybe.html"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-215"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Bits.html"><span class="hs-identifier">Data.Bits</span></a></span><span>        </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Data.Bits.html#.%26."><span class="hs-operator">(.&amp;.)</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-216"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Char.html"><span class="hs-identifier">Data.Char</span></a></span><span>        </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isSpace"><span class="hs-identifier">isSpace</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-217"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Ord.html"><span class="hs-identifier">Data.Ord</span></a></span><span>         </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Data.Ord.html#comparing"><span class="hs-identifier">comparing</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-218"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Tuple.html"><span class="hs-identifier">Data.Tuple</span></a></span><span>       </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Data.Tuple.html#fst"><span class="hs-identifier">fst</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Tuple.html#snd"><span class="hs-identifier">snd</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-219"></span><span>
</span><span id="line-220"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.html"><span class="hs-identifier">GHC.Num</span></a></span><span>
</span><span id="line-221"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Real.html"><span class="hs-identifier">GHC.Real</span></a></span><span>
</span><span id="line-222"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.List.html"><span class="hs-identifier">GHC.List</span></a></span><span>
</span><span id="line-223"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-224"></span><span>
</span><span id="line-225"></span><span class="hs-keyword">infix</span><span> </span><span class="hs-number">5</span><span> </span><span class="annot"><a href="Data.OldList.html#%5C%5C"><span class="hs-operator hs-type">\\</span></a></span><span> </span><span class="hs-comment">-- comment to fool cpp: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/phases.html#cpp-and-string-gaps</span><span>
</span><span id="line-226"></span><span>
</span><span id="line-227"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-228"></span><span class="hs-comment">-- List functions</span><span>
</span><span id="line-229"></span><span>
</span><span id="line-230"></span><span class="hs-comment">-- | The 'dropWhileEnd' function drops the largest suffix of a list</span><span>
</span><span id="line-231"></span><span class="hs-comment">-- in which the given predicate holds for all elements.  For example:</span><span>
</span><span id="line-232"></span><span class="hs-comment">--</span><span>
</span><span id="line-233"></span><span class="hs-comment">-- &gt;&gt;&gt; dropWhileEnd isSpace &quot;foo\n&quot;</span><span>
</span><span id="line-234"></span><span class="hs-comment">-- &quot;foo&quot;</span><span>
</span><span id="line-235"></span><span class="hs-comment">--</span><span>
</span><span id="line-236"></span><span class="hs-comment">-- &gt;&gt;&gt; dropWhileEnd isSpace &quot;foo bar&quot;</span><span>
</span><span id="line-237"></span><span class="hs-comment">-- &quot;foo bar&quot;</span><span>
</span><span id="line-238"></span><span class="hs-comment">--</span><span>
</span><span id="line-239"></span><span class="hs-comment">-- &gt; dropWhileEnd isSpace (&quot;foo\n&quot; ++ undefined) == &quot;foo&quot; ++ undefined</span><span>
</span><span id="line-240"></span><span class="hs-comment">--</span><span>
</span><span id="line-241"></span><span class="hs-comment">-- @since 4.5.0.0</span><span>
</span><span id="line-242"></span><span id="local-6989586621679533542"><span class="annot"><a href="Data.OldList.html#dropWhileEnd"><span class="hs-identifier hs-type">dropWhileEnd</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533542"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533542"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533542"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-243"></span><span id="dropWhileEnd"><span class="annot"><span class="annottext">dropWhileEnd :: forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#dropWhileEnd"><span class="hs-identifier hs-var hs-var">dropWhileEnd</span></a></span></span><span> </span><span id="local-6989586621679532903"><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679532903"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; [a] -&gt; [a]) -&gt; [a] -&gt; [a] -&gt; [a]
forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; [a] -&gt; b
</span><a href="GHC.Base.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679532902"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532902"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679532901"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532901"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679532903"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532902"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; Bool
forall a. [a] -&gt; Bool
</span><a href="GHC.List.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532901"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532902"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532901"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span class="hs-comment">-- | \(\mathcal{O}(\min(m,n))\). The 'stripPrefix' function drops the given</span><span>
</span><span id="line-246"></span><span class="hs-comment">-- prefix from a list. It returns 'Nothing' if the list did not start with the</span><span>
</span><span id="line-247"></span><span class="hs-comment">-- prefix given, or 'Just' the list after the prefix, if it does.</span><span>
</span><span id="line-248"></span><span class="hs-comment">--</span><span>
</span><span id="line-249"></span><span class="hs-comment">-- &gt;&gt;&gt; stripPrefix &quot;foo&quot; &quot;foobar&quot;</span><span>
</span><span id="line-250"></span><span class="hs-comment">-- Just &quot;bar&quot;</span><span>
</span><span id="line-251"></span><span class="hs-comment">--</span><span>
</span><span id="line-252"></span><span class="hs-comment">-- &gt;&gt;&gt; stripPrefix &quot;foo&quot; &quot;foo&quot;</span><span>
</span><span id="line-253"></span><span class="hs-comment">-- Just &quot;&quot;</span><span>
</span><span id="line-254"></span><span class="hs-comment">--</span><span>
</span><span id="line-255"></span><span class="hs-comment">-- &gt;&gt;&gt; stripPrefix &quot;foo&quot; &quot;barfoo&quot;</span><span>
</span><span id="line-256"></span><span class="hs-comment">-- Nothing</span><span>
</span><span id="line-257"></span><span class="hs-comment">--</span><span>
</span><span id="line-258"></span><span class="hs-comment">-- &gt;&gt;&gt; stripPrefix &quot;foo&quot; &quot;barfoobaz&quot;</span><span>
</span><span id="line-259"></span><span class="hs-comment">-- Nothing</span><span>
</span><span id="line-260"></span><span id="local-6989586621679533536"><span class="annot"><a href="Data.OldList.html#stripPrefix"><span class="hs-identifier hs-type">stripPrefix</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533536"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533536"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533536"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533536"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-261"></span><span id="stripPrefix"><span class="annot"><span class="annottext">stripPrefix :: forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Maybe [a]
</span><a href="Data.OldList.html#stripPrefix"><span class="hs-identifier hs-var hs-var">stripPrefix</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621679532896"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532896"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; Maybe [a]
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532896"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-262"></span><span class="annot"><a href="Data.OldList.html#stripPrefix"><span class="hs-identifier hs-var">stripPrefix</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532895"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532895"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532894"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532894"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532893"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532893"><span class="hs-identifier hs-var">y</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532892"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532892"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-263"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532895"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532893"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; Maybe [a]
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Maybe [a]
</span><a href="Data.OldList.html#stripPrefix"><span class="hs-identifier hs-var">stripPrefix</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532894"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532892"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-264"></span><span class="annot"><a href="Data.OldList.html#stripPrefix"><span class="hs-identifier hs-var">stripPrefix</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe [a]
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-265"></span><span>
</span><span id="line-266"></span><span class="hs-comment">-- | The 'elemIndex' function returns the index of the first element</span><span>
</span><span id="line-267"></span><span class="hs-comment">-- in the given list which is equal (by '==') to the query element,</span><span>
</span><span id="line-268"></span><span class="hs-comment">-- or 'Nothing' if there is no such element.</span><span>
</span><span id="line-269"></span><span class="hs-comment">--</span><span>
</span><span id="line-270"></span><span class="hs-comment">-- &gt;&gt;&gt; elemIndex 4 [0..]</span><span>
</span><span id="line-271"></span><span class="hs-comment">-- Just 4</span><span>
</span><span id="line-272"></span><span id="local-6989586621679533533"><span class="annot"><a href="Data.OldList.html#elemIndex"><span class="hs-identifier hs-type">elemIndex</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533533"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533533"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533533"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span></span><span>
</span><span id="line-273"></span><span id="elemIndex"><span class="annot"><span class="annottext">elemIndex :: forall a. Eq a =&gt; a -&gt; [a] -&gt; Maybe Int
</span><a href="Data.OldList.html#elemIndex"><span class="hs-identifier hs-var hs-var">elemIndex</span></a></span></span><span> </span><span id="local-6989586621679532889"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532889"><span class="hs-identifier hs-var">x</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; [a] -&gt; Maybe Int
forall a. (a -&gt; Bool) -&gt; [a] -&gt; Maybe Int
</span><a href="Data.OldList.html#findIndex"><span class="hs-identifier hs-var">findIndex</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532889"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-274"></span><span>
</span><span id="line-275"></span><span class="hs-comment">-- | The 'elemIndices' function extends 'elemIndex', by returning the</span><span>
</span><span id="line-276"></span><span class="hs-comment">-- indices of all elements equal to the query element, in ascending order.</span><span>
</span><span id="line-277"></span><span class="hs-comment">--</span><span>
</span><span id="line-278"></span><span class="hs-comment">-- &gt;&gt;&gt; elemIndices 'o' &quot;Hello World&quot;</span><span>
</span><span id="line-279"></span><span class="hs-comment">-- [4,7]</span><span>
</span><span id="line-280"></span><span id="local-6989586621679533530"><span class="annot"><a href="Data.OldList.html#elemIndices"><span class="hs-identifier hs-type">elemIndices</span></a></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533530"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533530"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533530"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-281"></span><span id="elemIndices"><span class="annot"><span class="annottext">elemIndices :: forall a. Eq a =&gt; a -&gt; [a] -&gt; [Int]
</span><a href="Data.OldList.html#elemIndices"><span class="hs-identifier hs-var hs-var">elemIndices</span></a></span></span><span> </span><span id="local-6989586621679532886"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532886"><span class="hs-identifier hs-var">x</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; [a] -&gt; [Int]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [Int]
</span><a href="Data.OldList.html#findIndices"><span class="hs-identifier hs-var">findIndices</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532886"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-282"></span><span>
</span><span id="line-283"></span><span class="hs-comment">-- | The 'find' function takes a predicate and a list and returns the</span><span>
</span><span id="line-284"></span><span class="hs-comment">-- first element in the list matching the predicate, or 'Nothing' if</span><span>
</span><span id="line-285"></span><span class="hs-comment">-- there is no such element.</span><span>
</span><span id="line-286"></span><span class="hs-comment">--</span><span>
</span><span id="line-287"></span><span class="hs-comment">-- &gt;&gt;&gt; find (&gt; 4) [1..]</span><span>
</span><span id="line-288"></span><span class="hs-comment">-- Just 5</span><span>
</span><span id="line-289"></span><span class="hs-comment">--</span><span>
</span><span id="line-290"></span><span class="hs-comment">-- &gt;&gt;&gt; find (&lt; 0) [1..10]</span><span>
</span><span id="line-291"></span><span class="hs-comment">-- Nothing</span><span>
</span><span id="line-292"></span><span id="local-6989586621679533527"><span class="annot"><a href="Data.OldList.html#find"><span class="hs-identifier hs-type">find</span></a></span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533527"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533527"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533527"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-293"></span><span id="find"><span class="annot"><span class="annottext">find :: forall a. (a -&gt; Bool) -&gt; [a] -&gt; Maybe a
</span><a href="Data.OldList.html#find"><span class="hs-identifier hs-var hs-var">find</span></a></span></span><span> </span><span id="local-6989586621679532885"><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679532885"><span class="hs-identifier hs-var">p</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; Maybe a
forall a. [a] -&gt; Maybe a
</span><a href="Data.Maybe.html#listToMaybe"><span class="hs-identifier hs-var">listToMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">([a] -&gt; Maybe a) -&gt; ([a] -&gt; [a]) -&gt; [a] -&gt; Maybe a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; [a] -&gt; [a]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679532885"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-294"></span><span>
</span><span id="line-295"></span><span class="hs-comment">-- | The 'findIndex' function takes a predicate and a list and returns</span><span>
</span><span id="line-296"></span><span class="hs-comment">-- the index of the first element in the list satisfying the predicate,</span><span>
</span><span id="line-297"></span><span class="hs-comment">-- or 'Nothing' if there is no such element.</span><span>
</span><span id="line-298"></span><span class="hs-comment">--</span><span>
</span><span id="line-299"></span><span class="hs-comment">-- &gt;&gt;&gt; findIndex isSpace &quot;Hello World!&quot;</span><span>
</span><span id="line-300"></span><span class="hs-comment">-- Just 5</span><span>
</span><span id="line-301"></span><span id="local-6989586621679533531"><span class="annot"><a href="Data.OldList.html#findIndex"><span class="hs-identifier hs-type">findIndex</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533531"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533531"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span></span><span>
</span><span id="line-302"></span><span id="findIndex"><span class="annot"><span class="annottext">findIndex :: forall a. (a -&gt; Bool) -&gt; [a] -&gt; Maybe Int
</span><a href="Data.OldList.html#findIndex"><span class="hs-identifier hs-var hs-var">findIndex</span></a></span></span><span> </span><span id="local-6989586621679532882"><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679532882"><span class="hs-identifier hs-var">p</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; Maybe Int
forall a. [a] -&gt; Maybe a
</span><a href="Data.Maybe.html#listToMaybe"><span class="hs-identifier hs-var">listToMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">([Int] -&gt; Maybe Int) -&gt; ([a] -&gt; [Int]) -&gt; [a] -&gt; Maybe Int
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; [a] -&gt; [Int]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [Int]
</span><a href="Data.OldList.html#findIndices"><span class="hs-identifier hs-var">findIndices</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679532882"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-303"></span><span>
</span><span id="line-304"></span><span class="hs-comment">-- | The 'findIndices' function extends 'findIndex', by returning the</span><span>
</span><span id="line-305"></span><span class="hs-comment">-- indices of all elements satisfying the predicate, in ascending order.</span><span>
</span><span id="line-306"></span><span class="hs-comment">--</span><span>
</span><span id="line-307"></span><span class="hs-comment">-- &gt;&gt;&gt; findIndices (`elem` &quot;aeiou&quot;) &quot;Hello World!&quot;</span><span>
</span><span id="line-308"></span><span class="hs-comment">-- [1,4,7]</span><span>
</span><span id="line-309"></span><span id="local-6989586621679533528"><span class="annot"><a href="Data.OldList.html#findIndices"><span class="hs-identifier hs-type">findIndices</span></a></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533528"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533528"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">]</span></span><span class="hs-cpp">
#if defined(USE_REPORT_PRELUDE)
</span><span class="hs-identifier">findIndices</span><span> </span><span class="hs-identifier">p</span><span> </span><span class="hs-identifier">xs</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-identifier">i</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">x</span><span class="hs-special">,</span><span class="hs-identifier">i</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-identifier">zip</span><span> </span><span class="hs-identifier">xs</span><span> </span><span class="hs-special">[</span><span class="hs-number">0</span><span class="hs-glyph">..</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">p</span><span> </span><span class="hs-identifier">x</span><span class="hs-special">]</span><span class="hs-cpp">
#else
</span><span class="hs-comment">-- Efficient definition, adapted from Data.Sequence</span><span>
</span><span id="line-314"></span><span class="hs-comment">-- (Note that making this INLINABLE instead of INLINE allows</span><span>
</span><span id="line-315"></span><span class="hs-comment">-- 'findIndex' to fuse, fixing #15426.)</span><span>
</span><span id="line-316"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Data.OldList.html#findIndices"><span class="hs-pragma hs-type">findIndices</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-317"></span><span id="findIndices"><span class="annot"><span class="annottext">findIndices :: forall a. (a -&gt; Bool) -&gt; [a] -&gt; [Int]
</span><a href="Data.OldList.html#findIndices"><span class="hs-identifier hs-var hs-var">findIndices</span></a></span></span><span> </span><span id="local-6989586621679532881"><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679532881"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679532880"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532880"><span class="hs-identifier hs-var">ls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall b. (Int -&gt; b -&gt; b) -&gt; b -&gt; b) -&gt; [Int]
forall a. (forall b. (a -&gt; b -&gt; b) -&gt; b -&gt; b) -&gt; [a]
</span><a href="GHC.Base.html#build"><span class="hs-identifier hs-var">build</span></a></span><span> </span><span class="annot"><span class="annottext">((forall b. (Int -&gt; b -&gt; b) -&gt; b -&gt; b) -&gt; [Int])
-&gt; (forall b. (Int -&gt; b -&gt; b) -&gt; b -&gt; b) -&gt; [Int]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679532879"><span class="annot"><span class="annottext">Int -&gt; b -&gt; b
</span><a href="#local-6989586621679532879"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679532878"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532878"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-318"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679532877"><span class="annot"><span class="annottext">go :: a -&gt; (Int# -&gt; b) -&gt; Int# -&gt; b
</span><a href="#local-6989586621679532877"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679532876"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532876"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679532875"><span class="annot"><span class="annottext">Int# -&gt; b
</span><a href="#local-6989586621679532875"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621679532874"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679532874"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679532881"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532876"><span class="hs-identifier hs-var">x</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679532874"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; b -&gt; b
</span><a href="#local-6989586621679532879"><span class="hs-operator hs-var">`c`</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; b
</span><a href="#local-6989586621679532875"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679532874"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-319"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; b
</span><a href="#local-6989586621679532875"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679532874"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-320"></span><span>  </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">(a -&gt; (Int# -&gt; b) -&gt; Int# -&gt; b) -&gt; (Int# -&gt; b) -&gt; [a] -&gt; Int# -&gt; b
forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; [a] -&gt; b
</span><a href="GHC.Base.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; (Int# -&gt; b) -&gt; Int# -&gt; b
</span><a href="#local-6989586621679532877"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">Int#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532878"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532880"><span class="hs-identifier hs-var">ls</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span class="hs-cpp">
#endif  /* USE_REPORT_PRELUDE */
</span><span>
</span><span id="line-323"></span><span class="hs-comment">-- | \(\mathcal{O}(\min(m,n))\). The 'isPrefixOf' function takes two lists and</span><span>
</span><span id="line-324"></span><span class="hs-comment">-- returns 'True' iff the first list is a prefix of the second.</span><span>
</span><span id="line-325"></span><span class="hs-comment">--</span><span>
</span><span id="line-326"></span><span class="hs-comment">-- &gt;&gt;&gt; &quot;Hello&quot; `isPrefixOf` &quot;Hello World!&quot;</span><span>
</span><span id="line-327"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-328"></span><span class="hs-comment">--</span><span>
</span><span id="line-329"></span><span class="hs-comment">-- &gt;&gt;&gt; &quot;Hello&quot; `isPrefixOf` &quot;Wello Horld!&quot;</span><span>
</span><span id="line-330"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-331"></span><span id="local-6989586621679533513"><span class="annot"><a href="Data.OldList.html#isPrefixOf"><span class="hs-identifier hs-type">isPrefixOf</span></a></span><span>              </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533513"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533513"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533513"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span></span><span>
</span><span id="line-332"></span><span id="isPrefixOf"><span class="annot"><span class="annottext">isPrefixOf :: forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Bool
</span><a href="Data.OldList.html#isPrefixOf"><span class="hs-identifier hs-var hs-var">isPrefixOf</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-333"></span><span class="annot"><a href="Data.OldList.html#isPrefixOf"><span class="hs-identifier hs-var">isPrefixOf</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-334"></span><span class="annot"><a href="Data.OldList.html#isPrefixOf"><span class="hs-identifier hs-var">isPrefixOf</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532870"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532870"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532869"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532869"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532868"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532868"><span class="hs-identifier hs-var">y</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532867"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532867"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532870"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532868"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; Bool
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Bool
</span><a href="Data.OldList.html#isPrefixOf"><span class="hs-identifier hs-var">isPrefixOf</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532869"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532867"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-335"></span><span>
</span><span id="line-336"></span><span class="hs-comment">-- | The 'isSuffixOf' function takes two lists and returns 'True' iff</span><span>
</span><span id="line-337"></span><span class="hs-comment">-- the first list is a suffix of the second. The second list must be</span><span>
</span><span id="line-338"></span><span class="hs-comment">-- finite.</span><span>
</span><span id="line-339"></span><span class="hs-comment">--</span><span>
</span><span id="line-340"></span><span class="hs-comment">-- &gt;&gt;&gt; &quot;ld!&quot; `isSuffixOf` &quot;Hello World!&quot;</span><span>
</span><span id="line-341"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-342"></span><span class="hs-comment">--</span><span>
</span><span id="line-343"></span><span class="hs-comment">-- &gt;&gt;&gt; &quot;World&quot; `isSuffixOf` &quot;Hello World!&quot;</span><span>
</span><span id="line-344"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-345"></span><span id="local-6989586621679532866"><span class="annot"><a href="Data.OldList.html#isSuffixOf"><span class="hs-identifier hs-type">isSuffixOf</span></a></span><span>              </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532866"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532866"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532866"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span></span><span>
</span><span id="line-346"></span><span id="local-6989586621679532859"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532859"><span class="hs-identifier hs-var">ns</span></a></span></span><span> </span><span id="isSuffixOf"><span class="annot"><span class="annottext">isSuffixOf :: forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Bool
</span><a href="Data.OldList.html#isSuffixOf"><span class="hs-operator hs-var hs-var">`isSuffixOf`</span></a></span></span><span> </span><span id="local-6989586621679532858"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532858"><span class="hs-identifier hs-var">hs</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; (Bool -&gt; Bool) -&gt; Maybe Bool -&gt; Bool
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe Bool -&gt; Bool) -&gt; Maybe Bool -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-347"></span><span>      </span><span id="local-6989586621679532855"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532855"><span class="hs-identifier hs-var">delta</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; Maybe [a]
forall a b. [a] -&gt; [b] -&gt; Maybe [b]
</span><a href="Data.OldList.html#dropLengthMaybe"><span class="hs-identifier hs-var">dropLengthMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532859"><span class="hs-identifier hs-var">ns</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532858"><span class="hs-identifier hs-var">hs</span></a></span><span>
</span><span id="line-348"></span><span>      </span><span class="annot"><span class="annottext">Bool -&gt; Maybe Bool
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Maybe Bool) -&gt; Bool -&gt; Maybe Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532859"><span class="hs-identifier hs-var">ns</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
forall a b. [a] -&gt; [b] -&gt; [b]
</span><a href="Data.OldList.html#dropLength"><span class="hs-identifier hs-var">dropLength</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532855"><span class="hs-identifier hs-var">delta</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532858"><span class="hs-identifier hs-var">hs</span></a></span><span>
</span><span id="line-349"></span><span>      </span><span class="hs-comment">-- Since dropLengthMaybe ns hs succeeded, we know that (if hs is finite)</span><span>
</span><span id="line-350"></span><span>      </span><span class="hs-comment">-- length ns + length delta = length hs</span><span>
</span><span id="line-351"></span><span>      </span><span class="hs-comment">-- so dropping the length of delta from hs will yield a suffix exactly</span><span>
</span><span id="line-352"></span><span>      </span><span class="hs-comment">-- the length of ns.</span><span>
</span><span id="line-353"></span><span>
</span><span id="line-354"></span><span class="hs-comment">-- A version of drop that drops the length of the first argument from the</span><span>
</span><span id="line-355"></span><span class="hs-comment">-- second argument. If xs is longer than ys, xs will not be traversed in its</span><span>
</span><span id="line-356"></span><span class="hs-comment">-- entirety.  dropLength is also generally faster than (drop . length)</span><span>
</span><span id="line-357"></span><span class="hs-comment">-- Both this and dropLengthMaybe could be written as folds over their first</span><span>
</span><span id="line-358"></span><span class="hs-comment">-- arguments, but this reduces clarity with no benefit to isSuffixOf.</span><span>
</span><span id="line-359"></span><span class="hs-comment">--</span><span>
</span><span id="line-360"></span><span class="hs-comment">-- &gt;&gt;&gt; dropLength &quot;Hello&quot; &quot;Holla world&quot;</span><span>
</span><span id="line-361"></span><span class="hs-comment">-- &quot; world&quot;</span><span>
</span><span id="line-362"></span><span class="hs-comment">--</span><span>
</span><span id="line-363"></span><span class="hs-comment">-- &gt;&gt;&gt; dropLength [1..] [1,2,3]</span><span>
</span><span id="line-364"></span><span class="hs-comment">-- []</span><span>
</span><span id="line-365"></span><span id="local-6989586621679533501"><span id="local-6989586621679533502"><span class="annot"><a href="Data.OldList.html#dropLength"><span class="hs-identifier hs-type">dropLength</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533502"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533501"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533501"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-366"></span><span id="dropLength"><span class="annot"><span class="annottext">dropLength :: forall a b. [a] -&gt; [b] -&gt; [b]
</span><a href="Data.OldList.html#dropLength"><span class="hs-identifier hs-var hs-var">dropLength</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621679532852"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532852"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532852"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-367"></span><span class="annot"><a href="Data.OldList.html#dropLength"><span class="hs-identifier hs-var">dropLength</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-368"></span><span class="annot"><a href="Data.OldList.html#dropLength"><span class="hs-identifier hs-var">dropLength</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532851"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532851"><span class="hs-identifier hs-var">x'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b
</span><span class="hs-identifier">_</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532850"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532850"><span class="hs-identifier hs-var">y'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [b] -&gt; [b]
forall a b. [a] -&gt; [b] -&gt; [b]
</span><a href="Data.OldList.html#dropLength"><span class="hs-identifier hs-var">dropLength</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532851"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532850"><span class="hs-identifier hs-var">y'</span></a></span><span>
</span><span id="line-369"></span><span>
</span><span id="line-370"></span><span class="hs-comment">-- A version of dropLength that returns Nothing if the second list runs out of</span><span>
</span><span id="line-371"></span><span class="hs-comment">-- elements before the first.</span><span>
</span><span id="line-372"></span><span class="hs-comment">--</span><span>
</span><span id="line-373"></span><span class="hs-comment">-- &gt;&gt;&gt; dropLengthMaybe [1..] [1,2,3]</span><span>
</span><span id="line-374"></span><span class="hs-comment">-- Nothing</span><span>
</span><span id="line-375"></span><span id="local-6989586621679533505"><span id="local-6989586621679533506"><span class="annot"><a href="Data.OldList.html#dropLengthMaybe"><span class="hs-identifier hs-type">dropLengthMaybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533506"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533505"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533505"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-376"></span><span id="dropLengthMaybe"><span class="annot"><span class="annottext">dropLengthMaybe :: forall a b. [a] -&gt; [b] -&gt; Maybe [b]
</span><a href="Data.OldList.html#dropLengthMaybe"><span class="hs-identifier hs-var hs-var">dropLengthMaybe</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621679532849"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532849"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[b] -&gt; Maybe [b]
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532849"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-377"></span><span class="annot"><a href="Data.OldList.html#dropLengthMaybe"><span class="hs-identifier hs-var">dropLengthMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe [b]
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-378"></span><span class="annot"><a href="Data.OldList.html#dropLengthMaybe"><span class="hs-identifier hs-var">dropLengthMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532848"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532848"><span class="hs-identifier hs-var">x'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b
</span><span class="hs-identifier">_</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532847"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532847"><span class="hs-identifier hs-var">y'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [b] -&gt; Maybe [b]
forall a b. [a] -&gt; [b] -&gt; Maybe [b]
</span><a href="Data.OldList.html#dropLengthMaybe"><span class="hs-identifier hs-var">dropLengthMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532848"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532847"><span class="hs-identifier hs-var">y'</span></a></span><span>
</span><span id="line-379"></span><span>
</span><span id="line-380"></span><span class="hs-comment">-- | The 'isInfixOf' function takes two lists and returns 'True'</span><span>
</span><span id="line-381"></span><span class="hs-comment">-- iff the first list is contained, wholly and intact,</span><span>
</span><span id="line-382"></span><span class="hs-comment">-- anywhere within the second.</span><span>
</span><span id="line-383"></span><span class="hs-comment">--</span><span>
</span><span id="line-384"></span><span class="hs-comment">-- &gt;&gt;&gt; isInfixOf &quot;Haskell&quot; &quot;I really like Haskell.&quot;</span><span>
</span><span id="line-385"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-386"></span><span class="hs-comment">--</span><span>
</span><span id="line-387"></span><span class="hs-comment">-- &gt;&gt;&gt; isInfixOf &quot;Ial&quot; &quot;I really like Haskell.&quot;</span><span>
</span><span id="line-388"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-389"></span><span id="local-6989586621679532846"><span class="annot"><a href="Data.OldList.html#isInfixOf"><span class="hs-identifier hs-type">isInfixOf</span></a></span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532846"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532846"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532846"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span></span><span>
</span><span id="line-390"></span><span id="isInfixOf"><span class="annot"><span class="annottext">isInfixOf :: forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Bool
</span><a href="Data.OldList.html#isInfixOf"><span class="hs-identifier hs-var hs-var">isInfixOf</span></a></span></span><span> </span><span id="local-6989586621679532843"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532843"><span class="hs-identifier hs-var">needle</span></a></span></span><span> </span><span id="local-6989586621679532842"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532842"><span class="hs-identifier hs-var">haystack</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([a] -&gt; Bool) -&gt; [[a]] -&gt; Bool
forall a. (a -&gt; Bool) -&gt; [a] -&gt; Bool
</span><a href="GHC.List.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; Bool
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Bool
</span><a href="Data.OldList.html#isPrefixOf"><span class="hs-identifier hs-var">isPrefixOf</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532843"><span class="hs-identifier hs-var">needle</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; [[a]]
forall a. [a] -&gt; [[a]]
</span><a href="Data.OldList.html#tails"><span class="hs-identifier hs-var">tails</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532842"><span class="hs-identifier hs-var">haystack</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-391"></span><span>
</span><span id="line-392"></span><span class="hs-comment">-- | \(\mathcal{O}(n^2)\). The 'nub' function removes duplicate elements from a</span><span>
</span><span id="line-393"></span><span class="hs-comment">-- list. In particular, it keeps only the first occurrence of each element. (The</span><span>
</span><span id="line-394"></span><span class="hs-comment">-- name 'nub' means \`essence\'.) It is a special case of 'nubBy', which allows</span><span>
</span><span id="line-395"></span><span class="hs-comment">-- the programmer to supply their own equality test.</span><span>
</span><span id="line-396"></span><span class="hs-comment">--</span><span>
</span><span id="line-397"></span><span class="hs-comment">-- &gt;&gt;&gt; nub [1,2,3,4,3,2,1,2,4,3,5]</span><span>
</span><span id="line-398"></span><span class="hs-comment">-- [1,2,3,4,5]</span><span>
</span><span id="line-399"></span><span id="local-6989586621679533493"><span class="annot"><a href="Data.OldList.html#nub"><span class="hs-identifier hs-type">nub</span></a></span><span>                     </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533493"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533493"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533493"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-400"></span><span id="nub"><span class="annot"><span class="annottext">nub :: forall a. Eq a =&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#nub"><span class="hs-identifier hs-var hs-var">nub</span></a></span></span><span>                     </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [a]
forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#nubBy"><span class="hs-identifier hs-var">nubBy</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">(==)</span></a></span><span>
</span><span id="line-401"></span><span>
</span><span id="line-402"></span><span class="hs-comment">-- | The 'nubBy' function behaves just like 'nub', except it uses a</span><span>
</span><span id="line-403"></span><span class="hs-comment">-- user-supplied equality predicate instead of the overloaded '=='</span><span>
</span><span id="line-404"></span><span class="hs-comment">-- function.</span><span>
</span><span id="line-405"></span><span class="hs-comment">--</span><span>
</span><span id="line-406"></span><span class="hs-comment">-- &gt;&gt;&gt; nubBy (\x y -&gt; mod x 3 == mod y 3) [1,2,4,5,6]</span><span>
</span><span id="line-407"></span><span class="hs-comment">-- [1,2,6]</span><span>
</span><span id="line-408"></span><span id="local-6989586621679533491"><span class="annot"><a href="Data.OldList.html#nubBy"><span class="hs-identifier hs-type">nubBy</span></a></span><span>                   </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533491"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533491"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533491"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533491"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span class="hs-cpp">
#if defined(USE_REPORT_PRELUDE)
</span><span class="hs-identifier">nubBy</span><span> </span><span class="hs-identifier">eq</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>             </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-411"></span><span class="hs-identifier">nubBy</span><span> </span><span class="hs-identifier">eq</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">x</span><span class="hs-glyph">:</span><span class="hs-identifier">xs</span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="hs-identifier">x</span><span> </span><span class="hs-glyph">:</span><span> </span><span class="hs-identifier">nubBy</span><span> </span><span class="hs-identifier">eq</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">filter</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span> </span><span class="hs-identifier">y</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">not</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">eq</span><span> </span><span class="hs-identifier">x</span><span> </span><span class="hs-identifier">y</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">xs</span><span class="hs-special">)</span><span class="hs-cpp">
#else
</span><span class="hs-comment">-- stolen from HBC</span><span>
</span><span id="line-414"></span><span id="nubBy"><span class="annot"><span class="annottext">nubBy :: forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#nubBy"><span class="hs-identifier hs-var hs-var">nubBy</span></a></span></span><span> </span><span id="local-6989586621679532839"><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532839"><span class="hs-identifier hs-var">eq</span></a></span></span><span> </span><span id="local-6989586621679532838"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532838"><span class="hs-identifier hs-var">l</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621679532837"><span class="hs-identifier hs-var">nubBy'</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532838"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-415"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-416"></span><span>    </span><span id="local-6989586621679532837"><span class="annot"><span class="annottext">nubBy' :: [a] -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621679532837"><span class="hs-identifier hs-var hs-var">nubBy'</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-417"></span><span>    </span><span class="annot"><a href="#local-6989586621679532837"><span class="hs-identifier hs-var">nubBy'</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532836"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532836"><span class="hs-identifier hs-var">y</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532835"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532835"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679532834"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532834"><span class="hs-identifier hs-var">xs</span></a></span></span><span>
</span><span id="line-418"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Bool) -&gt; a -&gt; [a] -&gt; Bool
forall a. (a -&gt; a -&gt; Bool) -&gt; a -&gt; [a] -&gt; Bool
</span><a href="Data.OldList.html#elem_by"><span class="hs-identifier hs-var">elem_by</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532839"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532836"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532834"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621679532837"><span class="hs-identifier hs-var">nubBy'</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532835"><span class="hs-identifier hs-var">ys</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532834"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-419"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532836"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621679532837"><span class="hs-identifier hs-var">nubBy'</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532835"><span class="hs-identifier hs-var">ys</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532836"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532834"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-420"></span><span>
</span><span id="line-421"></span><span class="hs-comment">-- Not exported:</span><span>
</span><span id="line-422"></span><span class="hs-comment">-- Note that we keep the call to `eq` with arguments in the</span><span>
</span><span id="line-423"></span><span class="hs-comment">-- same order as in the reference (prelude) implementation,</span><span>
</span><span id="line-424"></span><span class="hs-comment">-- and that this order is different from how `elem` calls (==).</span><span>
</span><span id="line-425"></span><span class="hs-comment">-- See #2528, #3280 and #7913.</span><span>
</span><span id="line-426"></span><span class="hs-comment">-- 'xs' is the list of things we've seen so far,</span><span>
</span><span id="line-427"></span><span class="hs-comment">-- 'y' is the potential new element</span><span>
</span><span id="line-428"></span><span id="local-6989586621679533489"><span class="annot"><a href="Data.OldList.html#elem_by"><span class="hs-identifier hs-type">elem_by</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533489"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533489"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533489"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533489"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span></span><span>
</span><span id="line-429"></span><span id="elem_by"><span class="annot"><span class="annottext">elem_by :: forall a. (a -&gt; a -&gt; Bool) -&gt; a -&gt; [a] -&gt; Bool
</span><a href="Data.OldList.html#elem_by"><span class="hs-identifier hs-var hs-var">elem_by</span></a></span></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-430"></span><span class="annot"><a href="Data.OldList.html#elem_by"><span class="hs-identifier hs-var">elem_by</span></a></span><span> </span><span id="local-6989586621679532832"><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532832"><span class="hs-identifier hs-var">eq</span></a></span></span><span> </span><span id="local-6989586621679532831"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532831"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532830"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532830"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532829"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532829"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532830"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532832"><span class="hs-operator hs-var">`eq`</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532831"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Bool) -&gt; a -&gt; [a] -&gt; Bool
forall a. (a -&gt; a -&gt; Bool) -&gt; a -&gt; [a] -&gt; Bool
</span><a href="Data.OldList.html#elem_by"><span class="hs-identifier hs-var">elem_by</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532832"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532831"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532829"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-433"></span><span>
</span><span id="line-434"></span><span class="hs-comment">-- | \(\mathcal{O}(n)\). 'delete' @x@ removes the first occurrence of @x@ from</span><span>
</span><span id="line-435"></span><span class="hs-comment">-- its list argument. For example,</span><span>
</span><span id="line-436"></span><span class="hs-comment">--</span><span>
</span><span id="line-437"></span><span class="hs-comment">-- &gt;&gt;&gt; delete 'a' &quot;banana&quot;</span><span>
</span><span id="line-438"></span><span class="hs-comment">-- &quot;bnana&quot;</span><span>
</span><span id="line-439"></span><span class="hs-comment">--</span><span>
</span><span id="line-440"></span><span class="hs-comment">-- It is a special case of 'deleteBy', which allows the programmer to</span><span>
</span><span id="line-441"></span><span class="hs-comment">-- supply their own equality test.</span><span>
</span><span id="line-442"></span><span id="local-6989586621679533487"><span class="annot"><a href="Data.OldList.html#delete"><span class="hs-identifier hs-type">delete</span></a></span><span>                  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533487"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533487"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533487"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533487"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-443"></span><span id="delete"><span class="annot"><span class="annottext">delete :: forall a. Eq a =&gt; a -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#delete"><span class="hs-identifier hs-var hs-var">delete</span></a></span></span><span>                  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Bool) -&gt; a -&gt; [a] -&gt; [a]
forall a. (a -&gt; a -&gt; Bool) -&gt; a -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#deleteBy"><span class="hs-identifier hs-var">deleteBy</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">(==)</span></a></span><span>
</span><span id="line-444"></span><span>
</span><span id="line-445"></span><span class="hs-comment">-- | \(\mathcal{O}(n)\). The 'deleteBy' function behaves like 'delete', but</span><span>
</span><span id="line-446"></span><span class="hs-comment">-- takes a user-supplied equality predicate.</span><span>
</span><span id="line-447"></span><span class="hs-comment">--</span><span>
</span><span id="line-448"></span><span class="hs-comment">-- &gt;&gt;&gt; deleteBy (&lt;=) 4 [1..10]</span><span>
</span><span id="line-449"></span><span class="hs-comment">-- [1,2,3,5,6,7,8,9,10]</span><span>
</span><span id="line-450"></span><span id="local-6989586621679533485"><span class="annot"><a href="Data.OldList.html#deleteBy"><span class="hs-identifier hs-type">deleteBy</span></a></span><span>                </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533485"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533485"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533485"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533485"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533485"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-451"></span><span id="deleteBy"><span class="annot"><span class="annottext">deleteBy :: forall a. (a -&gt; a -&gt; Bool) -&gt; a -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#deleteBy"><span class="hs-identifier hs-var hs-var">deleteBy</span></a></span></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-452"></span><span class="annot"><a href="Data.OldList.html#deleteBy"><span class="hs-identifier hs-var">deleteBy</span></a></span><span> </span><span id="local-6989586621679532825"><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532825"><span class="hs-identifier hs-var">eq</span></a></span></span><span> </span><span id="local-6989586621679532824"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532824"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532823"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532823"><span class="hs-identifier hs-var">y</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532822"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532822"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532824"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532825"><span class="hs-operator hs-var">`eq`</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532823"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532822"><span class="hs-identifier hs-var">ys</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532823"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Bool) -&gt; a -&gt; [a] -&gt; [a]
forall a. (a -&gt; a -&gt; Bool) -&gt; a -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#deleteBy"><span class="hs-identifier hs-var">deleteBy</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532825"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532824"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532822"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-453"></span><span>
</span><span id="line-454"></span><span class="hs-comment">-- | The '\\' function is list difference (non-associative).</span><span>
</span><span id="line-455"></span><span class="hs-comment">-- In the result of @xs@ '\\' @ys@, the first occurrence of each element of</span><span>
</span><span id="line-456"></span><span class="hs-comment">-- @ys@ in turn (if any) has been removed from @xs@.  Thus</span><span>
</span><span id="line-457"></span><span class="hs-comment">--</span><span>
</span><span id="line-458"></span><span class="hs-comment">-- &gt; (xs ++ ys) \\ xs == ys.</span><span>
</span><span id="line-459"></span><span class="hs-comment">--</span><span>
</span><span id="line-460"></span><span class="hs-comment">-- &gt;&gt;&gt; &quot;Hello World!&quot; \\ &quot;ell W&quot;</span><span>
</span><span id="line-461"></span><span class="hs-comment">-- &quot;Hoorld!&quot;</span><span>
</span><span id="line-462"></span><span class="hs-comment">--</span><span>
</span><span id="line-463"></span><span class="hs-comment">-- It is a special case of 'deleteFirstsBy', which allows the programmer</span><span>
</span><span id="line-464"></span><span class="hs-comment">-- to supply their own equality test.</span><span>
</span><span id="line-465"></span><span>
</span><span id="line-466"></span><span id="local-6989586621679533483"><span class="annot"><a href="Data.OldList.html#%5C%5C"><span class="hs-operator hs-type">(\\)</span></a></span><span>                    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533483"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533483"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533483"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533483"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-467"></span><span id="%5C%5C"><span class="annot"><span class="annottext">\\ :: forall a. Eq a =&gt; [a] -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#%5C%5C"><span class="hs-operator hs-var hs-var">(\\)</span></a></span></span><span>                    </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">([a] -&gt; a -&gt; [a]) -&gt; [a] -&gt; [a] -&gt; [a]
forall a b. (b -&gt; a -&gt; b) -&gt; b -&gt; [a] -&gt; b
</span><a href="GHC.List.html#foldl"><span class="hs-identifier hs-var">foldl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; [a] -&gt; [a]) -&gt; [a] -&gt; a -&gt; [a]
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. Eq a =&gt; a -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#delete"><span class="hs-identifier hs-var">delete</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-468"></span><span>
</span><span id="line-469"></span><span class="hs-comment">-- | The 'union' function returns the list union of the two lists.</span><span>
</span><span id="line-470"></span><span class="hs-comment">-- For example,</span><span>
</span><span id="line-471"></span><span class="hs-comment">--</span><span>
</span><span id="line-472"></span><span class="hs-comment">-- &gt;&gt;&gt; &quot;dog&quot; `union` &quot;cow&quot;</span><span>
</span><span id="line-473"></span><span class="hs-comment">-- &quot;dogcw&quot;</span><span>
</span><span id="line-474"></span><span class="hs-comment">--</span><span>
</span><span id="line-475"></span><span class="hs-comment">-- Duplicates, and elements of the first list, are removed from the</span><span>
</span><span id="line-476"></span><span class="hs-comment">-- the second list, but if the first list contains duplicates, so will</span><span>
</span><span id="line-477"></span><span class="hs-comment">-- the result.</span><span>
</span><span id="line-478"></span><span class="hs-comment">-- It is a special case of 'unionBy', which allows the programmer to supply</span><span>
</span><span id="line-479"></span><span class="hs-comment">-- their own equality test.</span><span>
</span><span id="line-480"></span><span>
</span><span id="line-481"></span><span id="local-6989586621679532818"><span class="annot"><a href="Data.OldList.html#union"><span class="hs-identifier hs-type">union</span></a></span><span>                   </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532818"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532818"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532818"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532818"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-482"></span><span id="union"><span class="annot"><span class="annottext">union :: forall a. Eq a =&gt; [a] -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#union"><span class="hs-identifier hs-var hs-var">union</span></a></span></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [a] -&gt; [a]
forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#unionBy"><span class="hs-identifier hs-var">unionBy</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">(==)</span></a></span><span>
</span><span id="line-483"></span><span>
</span><span id="line-484"></span><span class="hs-comment">-- | The 'unionBy' function is the non-overloaded version of 'union'.</span><span>
</span><span id="line-485"></span><span id="local-6989586621679533475"><span class="annot"><a href="Data.OldList.html#unionBy"><span class="hs-identifier hs-type">unionBy</span></a></span><span>                 </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533475"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533475"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533475"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533475"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533475"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-486"></span><span id="unionBy"><span class="annot"><span class="annottext">unionBy :: forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#unionBy"><span class="hs-identifier hs-var hs-var">unionBy</span></a></span></span><span> </span><span id="local-6989586621679532815"><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532815"><span class="hs-identifier hs-var">eq</span></a></span></span><span> </span><span id="local-6989586621679532814"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532814"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span id="local-6989586621679532813"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532813"><span class="hs-identifier hs-var">ys</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532814"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">([a] -&gt; a -&gt; [a]) -&gt; [a] -&gt; [a] -&gt; [a]
forall a b. (b -&gt; a -&gt; b) -&gt; b -&gt; [a] -&gt; b
</span><a href="GHC.List.html#foldl"><span class="hs-identifier hs-var">foldl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; [a] -&gt; [a]) -&gt; [a] -&gt; a -&gt; [a]
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Bool) -&gt; a -&gt; [a] -&gt; [a]
forall a. (a -&gt; a -&gt; Bool) -&gt; a -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#deleteBy"><span class="hs-identifier hs-var">deleteBy</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532815"><span class="hs-identifier hs-var">eq</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [a]
forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#nubBy"><span class="hs-identifier hs-var">nubBy</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532815"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532813"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532814"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-487"></span><span>
</span><span id="line-488"></span><span class="hs-comment">-- | The 'intersect' function takes the list intersection of two lists.</span><span>
</span><span id="line-489"></span><span class="hs-comment">-- For example,</span><span>
</span><span id="line-490"></span><span class="hs-comment">--</span><span>
</span><span id="line-491"></span><span class="hs-comment">-- &gt;&gt;&gt; [1,2,3,4] `intersect` [2,4,6,8]</span><span>
</span><span id="line-492"></span><span class="hs-comment">-- [2,4]</span><span>
</span><span id="line-493"></span><span class="hs-comment">--</span><span>
</span><span id="line-494"></span><span class="hs-comment">-- If the first list contains duplicates, so will the result.</span><span>
</span><span id="line-495"></span><span class="hs-comment">--</span><span>
</span><span id="line-496"></span><span class="hs-comment">-- &gt;&gt;&gt; [1,2,2,3,4] `intersect` [6,4,4,2]</span><span>
</span><span id="line-497"></span><span class="hs-comment">-- [2,2,4]</span><span>
</span><span id="line-498"></span><span class="hs-comment">--</span><span>
</span><span id="line-499"></span><span class="hs-comment">-- It is a special case of 'intersectBy', which allows the programmer to</span><span>
</span><span id="line-500"></span><span class="hs-comment">-- supply their own equality test. If the element is found in both the first</span><span>
</span><span id="line-501"></span><span class="hs-comment">-- and the second list, the element from the first list will be used.</span><span>
</span><span id="line-502"></span><span>
</span><span id="line-503"></span><span id="local-6989586621679532812"><span class="annot"><a href="Data.OldList.html#intersect"><span class="hs-identifier hs-type">intersect</span></a></span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532812"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532812"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532812"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532812"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-504"></span><span id="intersect"><span class="annot"><span class="annottext">intersect :: forall a. Eq a =&gt; [a] -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#intersect"><span class="hs-identifier hs-var hs-var">intersect</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [a] -&gt; [a]
forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#intersectBy"><span class="hs-identifier hs-var">intersectBy</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">(==)</span></a></span><span>
</span><span id="line-505"></span><span>
</span><span id="line-506"></span><span class="hs-comment">-- | The 'intersectBy' function is the non-overloaded version of 'intersect'.</span><span>
</span><span id="line-507"></span><span id="local-6989586621679532809"><span class="annot"><a href="Data.OldList.html#intersectBy"><span class="hs-identifier hs-type">intersectBy</span></a></span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679532809"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679532809"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532809"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532809"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532809"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-508"></span><span id="intersectBy"><span class="annot"><span class="annottext">intersectBy :: forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#intersectBy"><span class="hs-identifier hs-var hs-var">intersectBy</span></a></span></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-509"></span><span class="annot"><a href="Data.OldList.html#intersectBy"><span class="hs-identifier hs-var">intersectBy</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-510"></span><span class="annot"><a href="Data.OldList.html#intersectBy"><span class="hs-identifier hs-var">intersectBy</span></a></span><span> </span><span id="local-6989586621679532808"><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532808"><span class="hs-identifier hs-var">eq</span></a></span></span><span> </span><span id="local-6989586621679532807"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532807"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span id="local-6989586621679532806"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532806"><span class="hs-identifier hs-var">ys</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">[</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532805"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679532805"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532805"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532807"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; [a] -&gt; Bool
forall a. (a -&gt; Bool) -&gt; [a] -&gt; Bool
</span><a href="GHC.List.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532808"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532805"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532806"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-511"></span><span>
</span><span id="line-512"></span><span class="hs-comment">-- | \(\mathcal{O}(n)\). The 'intersperse' function takes an element and a list</span><span>
</span><span id="line-513"></span><span class="hs-comment">-- and \`intersperses\' that element between the elements of the list. For</span><span>
</span><span id="line-514"></span><span class="hs-comment">-- example,</span><span>
</span><span id="line-515"></span><span class="hs-comment">--</span><span>
</span><span id="line-516"></span><span class="hs-comment">-- &gt;&gt;&gt; intersperse ',' &quot;abcde&quot;</span><span>
</span><span id="line-517"></span><span class="hs-comment">-- &quot;a,b,c,d,e&quot;</span><span>
</span><span id="line-518"></span><span id="local-6989586621679532804"><span class="annot"><a href="Data.OldList.html#intersperse"><span class="hs-identifier hs-type">intersperse</span></a></span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679532804"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532804"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532804"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-519"></span><span id="intersperse"><span class="annot"><span class="annottext">intersperse :: forall a. a -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#intersperse"><span class="hs-identifier hs-var hs-var">intersperse</span></a></span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">[</span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-520"></span><span class="annot"><a href="Data.OldList.html#intersperse"><span class="hs-identifier hs-var">intersperse</span></a></span><span> </span><span id="local-6989586621679532803"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532803"><span class="hs-identifier hs-var">sep</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532802"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532802"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532801"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532801"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532802"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#prependToAll"><span class="hs-identifier hs-var">prependToAll</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532803"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532801"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-521"></span><span>
</span><span id="line-522"></span><span>
</span><span id="line-523"></span><span class="hs-comment">-- Not exported:</span><span>
</span><span id="line-524"></span><span class="hs-comment">-- We want to make every element in the 'intersperse'd list available</span><span>
</span><span id="line-525"></span><span class="hs-comment">-- as soon as possible to avoid space leaks. Experiments suggested that</span><span>
</span><span id="line-526"></span><span class="hs-comment">-- a separate top-level helper is more efficient than a local worker.</span><span>
</span><span id="line-527"></span><span id="local-6989586621679532799"><span class="annot"><a href="Data.OldList.html#prependToAll"><span class="hs-identifier hs-type">prependToAll</span></a></span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679532799"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532799"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532799"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-528"></span><span id="prependToAll"><span class="annot"><span class="annottext">prependToAll :: forall a. a -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#prependToAll"><span class="hs-identifier hs-var hs-var">prependToAll</span></a></span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-529"></span><span class="annot"><a href="Data.OldList.html#prependToAll"><span class="hs-identifier hs-var">prependToAll</span></a></span><span> </span><span id="local-6989586621679532798"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532798"><span class="hs-identifier hs-var">sep</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532797"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532797"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532796"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532796"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532798"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532797"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#prependToAll"><span class="hs-identifier hs-var">prependToAll</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532798"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532796"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-530"></span><span>
</span><span id="line-531"></span><span class="hs-comment">-- | 'intercalate' @xs xss@ is equivalent to @('concat' ('intersperse' xs xss))@.</span><span>
</span><span id="line-532"></span><span class="hs-comment">-- It inserts the list @xs@ in between the lists in @xss@ and concatenates the</span><span>
</span><span id="line-533"></span><span class="hs-comment">-- result.</span><span>
</span><span id="line-534"></span><span class="hs-comment">--</span><span>
</span><span id="line-535"></span><span class="hs-comment">-- &gt;&gt;&gt; intercalate &quot;, &quot; [&quot;Lorem&quot;, &quot;ipsum&quot;, &quot;dolor&quot;]</span><span>
</span><span id="line-536"></span><span class="hs-comment">-- &quot;Lorem, ipsum, dolor&quot;</span><span>
</span><span id="line-537"></span><span id="local-6989586621679533468"><span class="annot"><a href="Data.OldList.html#intercalate"><span class="hs-identifier hs-type">intercalate</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533468"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533468"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533468"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-538"></span><span id="intercalate"><span class="annot"><span class="annottext">intercalate :: forall a. [a] -&gt; [[a]] -&gt; [a]
</span><a href="Data.OldList.html#intercalate"><span class="hs-identifier hs-var hs-var">intercalate</span></a></span></span><span> </span><span id="local-6989586621679532795"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532795"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span id="local-6989586621679532794"><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532794"><span class="hs-identifier hs-var">xss</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[a]] -&gt; [a]
forall a. [[a]] -&gt; [a]
</span><a href="GHC.List.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; [[a]] -&gt; [[a]]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#intersperse"><span class="hs-identifier hs-var">intersperse</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532795"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532794"><span class="hs-identifier hs-var">xss</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-539"></span><span>
</span><span id="line-540"></span><span class="hs-comment">-- | The 'transpose' function transposes the rows and columns of its argument.</span><span>
</span><span id="line-541"></span><span class="hs-comment">-- For example,</span><span>
</span><span id="line-542"></span><span class="hs-comment">--</span><span>
</span><span id="line-543"></span><span class="hs-comment">-- &gt;&gt;&gt; transpose [[1,2,3],[4,5,6]]</span><span>
</span><span id="line-544"></span><span class="hs-comment">-- [[1,4],[2,5],[3,6]]</span><span>
</span><span id="line-545"></span><span class="hs-comment">--</span><span>
</span><span id="line-546"></span><span class="hs-comment">-- If some of the rows are shorter than the following rows, their elements are skipped:</span><span>
</span><span id="line-547"></span><span class="hs-comment">--</span><span>
</span><span id="line-548"></span><span class="hs-comment">-- &gt;&gt;&gt; transpose [[10,11],[20],[],[30,31,32]]</span><span>
</span><span id="line-549"></span><span class="hs-comment">-- [[10,20,30],[11,31],[32]]</span><span>
</span><span id="line-550"></span><span id="local-6989586621679533465"><span class="annot"><a href="Data.OldList.html#transpose"><span class="hs-identifier hs-type">transpose</span></a></span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533465"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533465"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span></span><span>
</span><span id="line-551"></span><span id="transpose"><span class="annot"><span class="annottext">transpose :: forall a. [[a]] -&gt; [[a]]
</span><a href="Data.OldList.html#transpose"><span class="hs-identifier hs-var hs-var">transpose</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-552"></span><span class="annot"><a href="Data.OldList.html#transpose"><span class="hs-identifier hs-var">transpose</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span>   </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679532793"><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532793"><span class="hs-identifier hs-var">xss</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[a]] -&gt; [[a]]
forall a. [[a]] -&gt; [[a]]
</span><a href="Data.OldList.html#transpose"><span class="hs-identifier hs-var">transpose</span></a></span><span> </span><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532793"><span class="hs-identifier hs-var">xss</span></a></span><span>
</span><span id="line-553"></span><span class="annot"><a href="Data.OldList.html#transpose"><span class="hs-identifier hs-var">transpose</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621679532792"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532792"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532791"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532791"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679532790"><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532790"><span class="hs-identifier hs-var">xss</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532792"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532789"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532789"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532789"><span class="hs-identifier hs-var">h</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532790"><span class="hs-identifier hs-var">xss</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]] -&gt; [[a]]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[[a]] -&gt; [[a]]
forall a. [[a]] -&gt; [[a]]
</span><a href="Data.OldList.html#transpose"><span class="hs-identifier hs-var">transpose</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532791"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]] -&gt; [[a]]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532788"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532788"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532788"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532790"><span class="hs-identifier hs-var">xss</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-554"></span><span>
</span><span id="line-555"></span><span>
</span><span id="line-556"></span><span class="hs-comment">-- | The 'partition' function takes a predicate a list and returns</span><span>
</span><span id="line-557"></span><span class="hs-comment">-- the pair of lists of elements which do and do not satisfy the</span><span>
</span><span id="line-558"></span><span class="hs-comment">-- predicate, respectively; i.e.,</span><span>
</span><span id="line-559"></span><span class="hs-comment">--</span><span>
</span><span id="line-560"></span><span class="hs-comment">-- &gt; partition p xs == (filter p xs, filter (not . p) xs)</span><span>
</span><span id="line-561"></span><span class="hs-comment">--</span><span>
</span><span id="line-562"></span><span class="hs-comment">-- &gt;&gt;&gt; partition (`elem` &quot;aeiou&quot;) &quot;Hello World!&quot;</span><span>
</span><span id="line-563"></span><span class="hs-comment">-- (&quot;eoo&quot;,&quot;Hll Wrld!&quot;)</span><span>
</span><span id="line-564"></span><span id="local-6989586621679533463"><span class="annot"><a href="Data.OldList.html#partition"><span class="hs-identifier hs-type">partition</span></a></span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533463"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533463"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533463"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533463"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span><span>
</span><span id="line-565"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.OldList.html#partition"><span class="hs-pragma hs-type">partition</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-566"></span><span id="partition"><span class="annot"><span class="annottext">partition :: forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="Data.OldList.html#partition"><span class="hs-identifier hs-var hs-var">partition</span></a></span></span><span> </span><span id="local-6989586621679532787"><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679532787"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679532786"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532786"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; ([a], [a]) -&gt; ([a], [a])) -&gt; ([a], [a]) -&gt; [a] -&gt; ([a], [a])
forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; [a] -&gt; b
</span><a href="GHC.Base.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; a -&gt; ([a], [a]) -&gt; ([a], [a])
forall a. (a -&gt; Bool) -&gt; a -&gt; ([a], [a]) -&gt; ([a], [a])
</span><a href="Data.OldList.html#select"><span class="hs-identifier hs-var">select</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679532787"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532786"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-567"></span><span>
</span><span id="line-568"></span><span id="local-6989586621679533461"><span class="annot"><a href="Data.OldList.html#select"><span class="hs-identifier hs-type">select</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533461"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533461"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533461"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533461"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533461"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533461"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span><span>
</span><span id="line-569"></span><span id="select"><span class="annot"><span class="annottext">select :: forall a. (a -&gt; Bool) -&gt; a -&gt; ([a], [a]) -&gt; ([a], [a])
</span><a href="Data.OldList.html#select"><span class="hs-identifier hs-var hs-var">select</span></a></span></span><span> </span><span id="local-6989586621679532784"><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679532784"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679532783"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532783"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679532782"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532782"><span class="hs-identifier hs-var">ts</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532781"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532781"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679532784"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532783"><span class="hs-identifier hs-var">x</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532783"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532782"><span class="hs-identifier hs-var">ts</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532781"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-570"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532782"><span class="hs-identifier hs-var">ts</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532783"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532781"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-571"></span><span>
</span><span id="line-572"></span><span class="hs-comment">-- | The 'mapAccumL' function behaves like a combination of 'map' and</span><span>
</span><span id="line-573"></span><span class="hs-comment">-- 'foldl'; it applies a function to each element of a list, passing</span><span>
</span><span id="line-574"></span><span class="hs-comment">-- an accumulating parameter from left to right, and returning a final</span><span>
</span><span id="line-575"></span><span class="hs-comment">-- value of this accumulator together with the new list.</span><span>
</span><span id="line-576"></span><span id="local-6989586621679533457"><span id="local-6989586621679533458"><span id="local-6989586621679533459"><span class="annot"><a href="Data.OldList.html#mapAccumL"><span class="hs-identifier hs-type">mapAccumL</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533459"><span class="hs-identifier hs-type">acc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533458"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533459"><span class="hs-identifier hs-type">acc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679533457"><span class="hs-identifier hs-type">y</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- Function of elt of input list</span><span>
</span><span id="line-577"></span><span>                                    </span><span class="hs-comment">-- and accumulator, returning new</span><span>
</span><span id="line-578"></span><span>                                    </span><span class="hs-comment">-- accumulator and elt of result list</span><span>
</span><span id="line-579"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533459"><span class="hs-identifier hs-type">acc</span></a></span><span>            </span><span class="hs-comment">-- Initial accumulator</span><span>
</span><span id="line-580"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533458"><span class="hs-identifier hs-type">x</span></a></span><span class="hs-special">]</span><span>            </span><span class="hs-comment">-- Input list</span><span>
</span><span id="line-581"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533459"><span class="hs-identifier hs-type">acc</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533457"><span class="hs-identifier hs-type">y</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span></span></span><span>     </span><span class="hs-comment">-- Final accumulator and result list</span><span>
</span><span id="line-582"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#mapAccumL"><span class="hs-pragma hs-type">mapAccumL</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-583"></span><span id="mapAccumL"><span class="annot"><span class="annottext">mapAccumL :: forall acc x y. (acc -&gt; x -&gt; (acc, y)) -&gt; acc -&gt; [x] -&gt; (acc, [y])
</span><a href="Data.OldList.html#mapAccumL"><span class="hs-identifier hs-var hs-var">mapAccumL</span></a></span></span><span> </span><span class="annot"><span class="annottext">acc -&gt; x -&gt; (acc, y)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679532780"><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532780"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532780"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-584"></span><span class="annot"><a href="Data.OldList.html#mapAccumL"><span class="hs-identifier hs-var">mapAccumL</span></a></span><span> </span><span id="local-6989586621679532779"><span class="annot"><span class="annottext">acc -&gt; x -&gt; (acc, y)
</span><a href="#local-6989586621679532779"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679532778"><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532778"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532777"><span class="annot"><span class="annottext">x
</span><a href="#local-6989586621679532777"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532776"><span class="annot"><span class="annottext">[x]
</span><a href="#local-6989586621679532776"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532775"><span class="hs-identifier hs-var">s''</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">y
</span><a href="#local-6989586621679532774"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">y -&gt; [y] -&gt; [y]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[y]
</span><a href="#local-6989586621679532773"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-585"></span><span>                           </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532772"><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532772"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679532774"><span class="annot"><span class="annottext">y
</span><a href="#local-6989586621679532774"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">acc -&gt; x -&gt; (acc, y)
</span><a href="#local-6989586621679532779"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532778"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">x
</span><a href="#local-6989586621679532777"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-586"></span><span>                                 </span><span class="hs-special">(</span><span id="local-6989586621679532775"><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532775"><span class="hs-identifier hs-var">s''</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532773"><span class="annot"><span class="annottext">[y]
</span><a href="#local-6989586621679532773"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(acc -&gt; x -&gt; (acc, y)) -&gt; acc -&gt; [x] -&gt; (acc, [y])
forall acc x y. (acc -&gt; x -&gt; (acc, y)) -&gt; acc -&gt; [x] -&gt; (acc, [y])
</span><a href="Data.OldList.html#mapAccumL"><span class="hs-identifier hs-var">mapAccumL</span></a></span><span> </span><span class="annot"><span class="annottext">acc -&gt; x -&gt; (acc, y)
</span><a href="#local-6989586621679532779"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532772"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="annot"><span class="annottext">[x]
</span><a href="#local-6989586621679532776"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-587"></span><span>
</span><span id="line-588"></span><span class="hs-pragma">{-# RULES</span><span>
</span><span id="line-589"></span><span class="annot"><span class="hs-pragma">&quot;mapAccumL&quot;</span></span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">~</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532771"><span class="annot"><a href="#local-6989586621679532771"><span class="hs-pragma hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679532770"><span class="annot"><a href="#local-6989586621679532770"><span class="hs-pragma hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679532769"><span class="annot"><a href="#local-6989586621679532769"><span class="hs-pragma hs-var">xs</span></a></span></span><span> </span><span class="hs-pragma">.</span><span> </span><span class="annot"><a href="Data.OldList.html#mapAccumL"><span class="hs-pragma hs-type">mapAccumL</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532771"><span class="hs-pragma hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532770"><span class="hs-pragma hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532769"><span class="hs-pragma hs-type">xs</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Base.html#foldr"><span class="hs-pragma hs-type">foldr</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.OldList.html#mapAccumLF"><span class="hs-pragma hs-type">mapAccumLF</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532771"><span class="hs-pragma hs-type">f</span></a></span><span class="hs-pragma">)</span><span> </span><span class="annot"><a href="Data.OldList.html#pairWithNil"><span class="hs-pragma hs-type">pairWithNil</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532769"><span class="hs-pragma hs-type">xs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532770"><span class="hs-pragma hs-type">s</span></a></span><span>
</span><span id="line-590"></span><span class="annot"><span class="hs-pragma">&quot;mapAccumLList&quot;</span></span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532766"><span class="annot"><a href="#local-6989586621679532766"><span class="hs-pragma hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679532765"><span class="annot"><a href="#local-6989586621679532765"><span class="hs-pragma hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679532764"><span class="annot"><a href="#local-6989586621679532764"><span class="hs-pragma hs-var">xs</span></a></span></span><span> </span><span class="hs-pragma">.</span><span> </span><span class="annot"><a href="GHC.Base.html#foldr"><span class="hs-pragma hs-type">foldr</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.OldList.html#mapAccumLF"><span class="hs-pragma hs-type">mapAccumLF</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532766"><span class="hs-pragma hs-type">f</span></a></span><span class="hs-pragma">)</span><span> </span><span class="annot"><a href="Data.OldList.html#pairWithNil"><span class="hs-pragma hs-type">pairWithNil</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532764"><span class="hs-pragma hs-type">xs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532765"><span class="hs-pragma hs-type">s</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="Data.OldList.html#mapAccumL"><span class="hs-pragma hs-type">mapAccumL</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532766"><span class="hs-pragma hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532765"><span class="hs-pragma hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532764"><span class="hs-pragma hs-type">xs</span></a></span><span>
</span><span id="line-591"></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-592"></span><span>
</span><span id="line-593"></span><span id="local-6989586621679533452"><span id="local-6989586621679533453"><span class="annot"><a href="Data.OldList.html#pairWithNil"><span class="hs-identifier hs-type">pairWithNil</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679533453"><span class="hs-identifier hs-type">acc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533453"><span class="hs-identifier hs-type">acc</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533452"><span class="hs-identifier hs-type">y</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span></span><span>
</span><span id="line-594"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#pairWithNil"><span class="hs-pragma hs-type">pairWithNil</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-595"></span><span id="pairWithNil"><span class="annot"><span class="annottext">pairWithNil :: forall acc y. acc -&gt; (acc, [y])
</span><a href="Data.OldList.html#pairWithNil"><span class="hs-identifier hs-var hs-var">pairWithNil</span></a></span></span><span> </span><span id="local-6989586621679532763"><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532763"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532763"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-596"></span><span>
</span><span id="line-597"></span><span id="local-6989586621679533447"><span id="local-6989586621679533448"><span id="local-6989586621679533449"><span class="annot"><a href="Data.OldList.html#mapAccumLF"><span class="hs-identifier hs-type">mapAccumLF</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533449"><span class="hs-identifier hs-type">acc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533448"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533449"><span class="hs-identifier hs-type">acc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679533447"><span class="hs-identifier hs-type">y</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533448"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533449"><span class="hs-identifier hs-type">acc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533449"><span class="hs-identifier hs-type">acc</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533447"><span class="hs-identifier hs-type">y</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533449"><span class="hs-identifier hs-type">acc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533449"><span class="hs-identifier hs-type">acc</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533447"><span class="hs-identifier hs-type">y</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-598"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#mapAccumLF"><span class="hs-pragma hs-type">mapAccumLF</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-599"></span><span id="mapAccumLF"><span class="annot"><span class="annottext">mapAccumLF :: forall acc x y.
(acc -&gt; x -&gt; (acc, y))
-&gt; x -&gt; (acc -&gt; (acc, [y])) -&gt; acc -&gt; (acc, [y])
</span><a href="Data.OldList.html#mapAccumLF"><span class="hs-identifier hs-var hs-var">mapAccumLF</span></a></span></span><span> </span><span id="local-6989586621679532762"><span class="annot"><span class="annottext">acc -&gt; x -&gt; (acc, y)
</span><a href="#local-6989586621679532762"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679532761"><span class="annot"><span class="annottext">x
</span><a href="#local-6989586621679532761"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679532760"><span class="annot"><span class="annottext">acc -&gt; (acc, [y])
</span><a href="#local-6989586621679532760"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(acc -&gt; (acc, [y])) -&gt; acc -&gt; (acc, [y])
</span><a href="../../ghc-prim/src/GHC.Magic.html#oneShot"><span class="hs-identifier hs-var">oneShot</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679532759"><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532759"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-600"></span><span>                         </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532758"><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532758"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679532757"><span class="annot"><span class="annottext">y
</span><a href="#local-6989586621679532757"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">acc -&gt; x -&gt; (acc, y)
</span><a href="#local-6989586621679532762"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532759"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">x
</span><a href="#local-6989586621679532761"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-601"></span><span>                             </span><span class="hs-special">(</span><span id="local-6989586621679532756"><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532756"><span class="hs-identifier hs-var">s''</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679532755"><span class="annot"><span class="annottext">[y]
</span><a href="#local-6989586621679532755"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">acc -&gt; (acc, [y])
</span><a href="#local-6989586621679532760"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532758"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-602"></span><span>                         </span><span class="hs-keyword">in</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532756"><span class="hs-identifier hs-var">s''</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">y
</span><a href="#local-6989586621679532757"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">y -&gt; [y] -&gt; [y]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[y]
</span><a href="#local-6989586621679532755"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-603"></span><span>  </span><span class="hs-comment">-- See Note [Left folds via right fold]</span><span>
</span><span id="line-604"></span><span>
</span><span id="line-605"></span><span>
</span><span id="line-606"></span><span class="hs-comment">-- | The 'mapAccumR' function behaves like a combination of 'map' and</span><span>
</span><span id="line-607"></span><span class="hs-comment">-- 'foldr'; it applies a function to each element of a list, passing</span><span>
</span><span id="line-608"></span><span class="hs-comment">-- an accumulating parameter from right to left, and returning a final</span><span>
</span><span id="line-609"></span><span class="hs-comment">-- value of this accumulator together with the new list.</span><span>
</span><span id="line-610"></span><span id="local-6989586621679532752"><span id="local-6989586621679532753"><span id="local-6989586621679532754"><span class="annot"><a href="Data.OldList.html#mapAccumR"><span class="hs-identifier hs-type">mapAccumR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679532754"><span class="hs-identifier hs-type">acc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679532753"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679532754"><span class="hs-identifier hs-type">acc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679532752"><span class="hs-identifier hs-type">y</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>     </span><span class="hs-comment">-- Function of elt of input list</span><span>
</span><span id="line-611"></span><span>                                        </span><span class="hs-comment">-- and accumulator, returning new</span><span>
</span><span id="line-612"></span><span>                                        </span><span class="hs-comment">-- accumulator and elt of result list</span><span>
</span><span id="line-613"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679532754"><span class="hs-identifier hs-type">acc</span></a></span><span>              </span><span class="hs-comment">-- Initial accumulator</span><span>
</span><span id="line-614"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532753"><span class="hs-identifier hs-type">x</span></a></span><span class="hs-special">]</span><span>              </span><span class="hs-comment">-- Input list</span><span>
</span><span id="line-615"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679532754"><span class="hs-identifier hs-type">acc</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532752"><span class="hs-identifier hs-type">y</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span></span></span><span>               </span><span class="hs-comment">-- Final accumulator and result list</span><span>
</span><span id="line-616"></span><span id="mapAccumR"><span class="annot"><span class="annottext">mapAccumR :: forall acc x y. (acc -&gt; x -&gt; (acc, y)) -&gt; acc -&gt; [x] -&gt; (acc, [y])
</span><a href="Data.OldList.html#mapAccumR"><span class="hs-identifier hs-var hs-var">mapAccumR</span></a></span></span><span> </span><span class="annot"><span class="annottext">acc -&gt; x -&gt; (acc, y)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679532751"><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532751"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532751"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-617"></span><span class="annot"><a href="Data.OldList.html#mapAccumR"><span class="hs-identifier hs-var">mapAccumR</span></a></span><span> </span><span id="local-6989586621679532750"><span class="annot"><span class="annottext">acc -&gt; x -&gt; (acc, y)
</span><a href="#local-6989586621679532750"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679532749"><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532749"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532748"><span class="annot"><span class="annottext">x
</span><a href="#local-6989586621679532748"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532747"><span class="annot"><span class="annottext">[x]
</span><a href="#local-6989586621679532747"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532746"><span class="hs-identifier hs-var">s''</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">y
</span><a href="#local-6989586621679532745"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">y -&gt; [y] -&gt; [y]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[y]
</span><a href="#local-6989586621679532744"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-618"></span><span>                           </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532746"><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532746"><span class="hs-identifier hs-var">s''</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532745"><span class="annot"><span class="annottext">y
</span><a href="#local-6989586621679532745"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">acc -&gt; x -&gt; (acc, y)
</span><a href="#local-6989586621679532750"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532743"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="annot"><span class="annottext">x
</span><a href="#local-6989586621679532748"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-619"></span><span>                                 </span><span class="hs-special">(</span><span id="local-6989586621679532743"><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532743"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679532744"><span class="annot"><span class="annottext">[y]
</span><a href="#local-6989586621679532744"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(acc -&gt; x -&gt; (acc, y)) -&gt; acc -&gt; [x] -&gt; (acc, [y])
forall acc x y. (acc -&gt; x -&gt; (acc, y)) -&gt; acc -&gt; [x] -&gt; (acc, [y])
</span><a href="Data.OldList.html#mapAccumR"><span class="hs-identifier hs-var">mapAccumR</span></a></span><span> </span><span class="annot"><span class="annottext">acc -&gt; x -&gt; (acc, y)
</span><a href="#local-6989586621679532750"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">acc
</span><a href="#local-6989586621679532749"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">[x]
</span><a href="#local-6989586621679532747"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-620"></span><span>
</span><span id="line-621"></span><span class="hs-comment">-- | \(\mathcal{O}(n)\). The 'insert' function takes an element and a list and</span><span>
</span><span id="line-622"></span><span class="hs-comment">-- inserts the element into the list at the first position where it is less than</span><span>
</span><span id="line-623"></span><span class="hs-comment">-- or equal to the next element. In particular, if the list is sorted before the</span><span>
</span><span id="line-624"></span><span class="hs-comment">-- call, the result will also be sorted. It is a special case of 'insertBy',</span><span>
</span><span id="line-625"></span><span class="hs-comment">-- which allows the programmer to supply their own comparison function.</span><span>
</span><span id="line-626"></span><span class="hs-comment">--</span><span>
</span><span id="line-627"></span><span class="hs-comment">-- &gt;&gt;&gt; insert 4 [1,2,3,5,6,7]</span><span>
</span><span id="line-628"></span><span class="hs-comment">-- [1,2,3,4,5,6,7]</span><span>
</span><span id="line-629"></span><span id="local-6989586621679533437"><span class="annot"><a href="Data.OldList.html#insert"><span class="hs-identifier hs-type">insert</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-type">Ord</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533437"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533437"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533437"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533437"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-630"></span><span id="insert"><span class="annot"><span class="annottext">insert :: forall a. Ord a =&gt; a -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#insert"><span class="hs-identifier hs-var hs-var">insert</span></a></span></span><span> </span><span id="local-6989586621679532740"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532740"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621679532739"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532739"><span class="hs-identifier hs-var">ls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Ordering) -&gt; a -&gt; [a] -&gt; [a]
forall a. (a -&gt; a -&gt; Ordering) -&gt; a -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#insertBy"><span class="hs-identifier hs-var">insertBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var">compare</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532740"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532739"><span class="hs-identifier hs-var">ls</span></a></span><span>
</span><span id="line-631"></span><span>
</span><span id="line-632"></span><span class="hs-comment">-- | \(\mathcal{O}(n)\). The non-overloaded version of 'insert'.</span><span>
</span><span id="line-633"></span><span id="local-6989586621679533435"><span class="annot"><a href="Data.OldList.html#insertBy"><span class="hs-identifier hs-type">insertBy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533435"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533435"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Ordering"><span class="hs-identifier hs-type">Ordering</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533435"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533435"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533435"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-634"></span><span id="insertBy"><span class="annot"><span class="annottext">insertBy :: forall a. (a -&gt; a -&gt; Ordering) -&gt; a -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#insertBy"><span class="hs-identifier hs-var hs-var">insertBy</span></a></span></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><span class="hs-identifier">_</span></span><span>   </span><span id="local-6989586621679532737"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532737"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532737"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-635"></span><span class="annot"><a href="Data.OldList.html#insertBy"><span class="hs-identifier hs-var">insertBy</span></a></span><span> </span><span id="local-6989586621679532736"><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679532736"><span class="hs-identifier hs-var">cmp</span></a></span></span><span> </span><span id="local-6989586621679532735"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532735"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679532734"><span class="annot"><span class="annottext">ys :: [a]
</span><a href="#local-6989586621679532734"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621679532733"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532733"><span class="hs-identifier hs-var">y</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532732"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532732"><span class="hs-identifier hs-var">ys'</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-636"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679532736"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532735"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532733"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-637"></span><span>     </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532733"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Ordering) -&gt; a -&gt; [a] -&gt; [a]
forall a. (a -&gt; a -&gt; Ordering) -&gt; a -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#insertBy"><span class="hs-identifier hs-var">insertBy</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679532736"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532735"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532732"><span class="hs-identifier hs-var">ys'</span></a></span><span>
</span><span id="line-638"></span><span>     </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532735"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532734"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-639"></span><span>
</span><span id="line-640"></span><span class="hs-comment">-- | The 'maximumBy' function takes a comparison function and a list</span><span>
</span><span id="line-641"></span><span class="hs-comment">-- and returns the greatest element of the list by the comparison function.</span><span>
</span><span id="line-642"></span><span class="hs-comment">-- The list must be finite and non-empty.</span><span>
</span><span id="line-643"></span><span class="hs-comment">--</span><span>
</span><span id="line-644"></span><span class="hs-comment">-- We can use this to find the longest entry of a list:</span><span>
</span><span id="line-645"></span><span class="hs-comment">--</span><span>
</span><span id="line-646"></span><span class="hs-comment">-- &gt;&gt;&gt; maximumBy (\x y -&gt; compare (length x) (length y)) [&quot;Hello&quot;, &quot;World&quot;, &quot;!&quot;, &quot;Longest&quot;, &quot;bar&quot;]</span><span>
</span><span id="line-647"></span><span class="hs-comment">-- &quot;Longest&quot;</span><span>
</span><span id="line-648"></span><span id="local-6989586621679533432"><span class="annot"><a href="Data.OldList.html#maximumBy"><span class="hs-identifier hs-type">maximumBy</span></a></span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533432"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533432"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Ordering"><span class="hs-identifier hs-type">Ordering</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533432"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533432"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-649"></span><span id="maximumBy"><span class="annot"><span class="annottext">maximumBy :: forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; a
</span><a href="Data.OldList.html#maximumBy"><span class="hs-identifier hs-var hs-var">maximumBy</span></a></span></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">[Char] -&gt; a
forall a. [Char] -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;List.maximumBy: empty list&quot;</span></span><span>
</span><span id="line-650"></span><span class="annot"><a href="Data.OldList.html#maximumBy"><span class="hs-identifier hs-var">maximumBy</span></a></span><span> </span><span id="local-6989586621679532730"><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679532730"><span class="hs-identifier hs-var">cmp</span></a></span></span><span> </span><span id="local-6989586621679532729"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532729"><span class="hs-identifier hs-var">xs</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; a) -&gt; [a] -&gt; a
forall a. (a -&gt; a -&gt; a) -&gt; [a] -&gt; a
</span><a href="GHC.List.html#foldl1"><span class="hs-identifier hs-var">foldl1</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679532728"><span class="hs-identifier hs-var">maxBy</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532729"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-651"></span><span>                        </span><span class="hs-keyword">where</span><span>
</span><span id="line-652"></span><span>                           </span><span id="local-6989586621679532728"><span class="annot"><span class="annottext">maxBy :: a -&gt; a -&gt; a
</span><a href="#local-6989586621679532728"><span class="hs-identifier hs-var hs-var">maxBy</span></a></span></span><span> </span><span id="local-6989586621679532727"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532727"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679532726"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532726"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679532730"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532727"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532726"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-653"></span><span>                                       </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532727"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-654"></span><span>                                       </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532726"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-655"></span><span>
</span><span id="line-656"></span><span class="hs-comment">-- | The 'minimumBy' function takes a comparison function and a list</span><span>
</span><span id="line-657"></span><span class="hs-comment">-- and returns the least element of the list by the comparison function.</span><span>
</span><span id="line-658"></span><span class="hs-comment">-- The list must be finite and non-empty.</span><span>
</span><span id="line-659"></span><span class="hs-comment">--</span><span>
</span><span id="line-660"></span><span class="hs-comment">-- We can use this to find the shortest entry of a list:</span><span>
</span><span id="line-661"></span><span class="hs-comment">--</span><span>
</span><span id="line-662"></span><span class="hs-comment">-- &gt;&gt;&gt; minimumBy (\x y -&gt; compare (length x) (length y)) [&quot;Hello&quot;, &quot;World&quot;, &quot;!&quot;, &quot;Longest&quot;, &quot;bar&quot;]</span><span>
</span><span id="line-663"></span><span class="hs-comment">-- &quot;!&quot;</span><span>
</span><span id="line-664"></span><span id="local-6989586621679532725"><span class="annot"><a href="Data.OldList.html#minimumBy"><span class="hs-identifier hs-type">minimumBy</span></a></span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679532725"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679532725"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Ordering"><span class="hs-identifier hs-type">Ordering</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532725"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679532725"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-665"></span><span id="minimumBy"><span class="annot"><span class="annottext">minimumBy :: forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; a
</span><a href="Data.OldList.html#minimumBy"><span class="hs-identifier hs-var hs-var">minimumBy</span></a></span></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">[Char] -&gt; a
forall a. [Char] -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;List.minimumBy: empty list&quot;</span></span><span>
</span><span id="line-666"></span><span class="annot"><a href="Data.OldList.html#minimumBy"><span class="hs-identifier hs-var">minimumBy</span></a></span><span> </span><span id="local-6989586621679532724"><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679532724"><span class="hs-identifier hs-var">cmp</span></a></span></span><span> </span><span id="local-6989586621679532723"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532723"><span class="hs-identifier hs-var">xs</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; a) -&gt; [a] -&gt; a
forall a. (a -&gt; a -&gt; a) -&gt; [a] -&gt; a
</span><a href="GHC.List.html#foldl1"><span class="hs-identifier hs-var">foldl1</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679532722"><span class="hs-identifier hs-var">minBy</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532723"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-667"></span><span>                        </span><span class="hs-keyword">where</span><span>
</span><span id="line-668"></span><span>                           </span><span id="local-6989586621679532722"><span class="annot"><span class="annottext">minBy :: a -&gt; a -&gt; a
</span><a href="#local-6989586621679532722"><span class="hs-identifier hs-var hs-var">minBy</span></a></span></span><span> </span><span id="local-6989586621679532721"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532721"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679532720"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532720"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679532724"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532721"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532720"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-669"></span><span>                                       </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532720"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-670"></span><span>                                       </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532721"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-671"></span><span>
</span><span id="line-672"></span><span class="hs-comment">-- | \(\mathcal{O}(n)\). The 'genericLength' function is an overloaded version</span><span>
</span><span id="line-673"></span><span class="hs-comment">-- of 'length'. In particular, instead of returning an 'Int', it returns any</span><span>
</span><span id="line-674"></span><span class="hs-comment">-- type which is an instance of 'Num'. It is, however, less efficient than</span><span>
</span><span id="line-675"></span><span class="hs-comment">-- 'length'.</span><span>
</span><span id="line-676"></span><span class="hs-comment">--</span><span>
</span><span id="line-677"></span><span class="hs-comment">-- &gt;&gt;&gt; genericLength [1, 2, 3] :: Int</span><span>
</span><span id="line-678"></span><span class="hs-comment">-- 3</span><span>
</span><span id="line-679"></span><span class="hs-comment">-- &gt;&gt;&gt; genericLength [1, 2, 3] :: Float</span><span>
</span><span id="line-680"></span><span class="hs-comment">-- 3.0</span><span>
</span><span id="line-681"></span><span id="local-6989586621679533425"><span id="local-6989586621679533426"><span class="annot"><a href="Data.OldList.html#genericLength"><span class="hs-identifier hs-type">genericLength</span></a></span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533426"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533425"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533426"><span class="hs-identifier hs-type">i</span></a></span></span></span><span>
</span><span id="line-682"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#genericLength"><span class="hs-pragma hs-type">genericLength</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-683"></span><span id="genericLength"><span class="annot"><span class="annottext">genericLength :: forall i a. Num i =&gt; [a] -&gt; i
</span><a href="Data.OldList.html#genericLength"><span class="hs-identifier hs-var hs-var">genericLength</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">i
</span><span class="hs-number">0</span></span><span>
</span><span id="line-684"></span><span class="annot"><a href="Data.OldList.html#genericLength"><span class="hs-identifier hs-var">genericLength</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532714"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532714"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">i
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">i -&gt; i -&gt; i
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; i
forall i a. Num i =&gt; [a] -&gt; i
</span><a href="Data.OldList.html#genericLength"><span class="hs-identifier hs-var">genericLength</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532714"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-685"></span><span>
</span><span id="line-686"></span><span class="hs-pragma">{-# RULES</span><span>
</span><span id="line-687"></span><span>  </span><span class="annot"><span class="hs-pragma">&quot;genericLengthInt&quot;</span></span><span>     </span><span class="annot"><a href="Data.OldList.html#genericLength"><span class="hs-pragma hs-type">genericLength</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="hs-pragma">(</span><span id="local-6989586621679532712"><span class="annot"><a href="Data.OldList.html#strictGenericLength"><span class="hs-pragma hs-type">strictGenericLength</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="hs-pragma">[</span><span class="annot"><a href="#local-6989586621679532712"><span class="hs-pragma hs-type">a</span></a></span><span class="hs-pragma">]</span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span></span><span class="hs-pragma">)</span><span class="hs-pragma">;</span><span>
</span><span id="line-688"></span><span>  </span><span class="annot"><span class="hs-pragma">&quot;genericLengthInteger&quot;</span></span><span> </span><span class="annot"><a href="Data.OldList.html#genericLength"><span class="hs-pragma hs-type">genericLength</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="hs-pragma">(</span><span id="local-6989586621679532710"><span class="annot"><a href="Data.OldList.html#strictGenericLength"><span class="hs-pragma hs-type">strictGenericLength</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="hs-pragma">[</span><span class="annot"><a href="#local-6989586621679532710"><span class="hs-pragma hs-type">a</span></a></span><span class="hs-pragma">]</span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-pragma hs-type">Integer</span></a></span></span><span class="hs-pragma">)</span><span class="hs-pragma">;</span><span>
</span><span id="line-689"></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-690"></span><span>
</span><span id="line-691"></span><span id="local-6989586621679532708"><span id="local-6989586621679532709"><span class="annot"><a href="Data.OldList.html#strictGenericLength"><span class="hs-identifier hs-type">strictGenericLength</span></a></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532709"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532708"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679532709"><span class="hs-identifier hs-type">i</span></a></span></span></span><span>
</span><span id="line-692"></span><span id="strictGenericLength"><span class="annot"><span class="annottext">strictGenericLength :: forall i a. Num i =&gt; [a] -&gt; i
</span><a href="Data.OldList.html#strictGenericLength"><span class="hs-identifier hs-var hs-var">strictGenericLength</span></a></span></span><span> </span><span id="local-6989586621679532704"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532704"><span class="hs-identifier hs-var">l</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">[b] -&gt; i -&gt; i
forall {t} {a}. Num t =&gt; [a] -&gt; t -&gt; t
</span><a href="#local-6989586621679532703"><span class="hs-identifier hs-var">gl</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532704"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">i
</span><span class="hs-number">0</span></span><span>
</span><span id="line-693"></span><span>                        </span><span class="hs-keyword">where</span><span>
</span><span id="line-694"></span><span>                           </span><span id="local-6989586621679532703"><span class="annot"><span class="annottext">gl :: [a] -&gt; t -&gt; t
</span><a href="#local-6989586621679532703"><span class="hs-identifier hs-var hs-var">gl</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621679532701"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679532701"><span class="hs-identifier hs-var">a</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679532701"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-695"></span><span>                           </span><span class="annot"><a href="#local-6989586621679532703"><span class="hs-identifier hs-var">gl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532700"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532700"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679532699"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679532699"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679532696"><span class="annot"><span class="annottext">a' :: t
</span><a href="#local-6989586621679532696"><span class="hs-identifier hs-var hs-var">a'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679532699"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; t
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679532696"><span class="hs-identifier hs-var">a'</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; t
</span><a href="../../ghc-prim/src/GHC.Prim.html#seq"><span class="hs-operator hs-var">`seq`</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; t -&gt; t
</span><a href="#local-6989586621679532703"><span class="hs-identifier hs-var">gl</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532700"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679532696"><span class="hs-identifier hs-var">a'</span></a></span><span>
</span><span id="line-696"></span><span>
</span><span id="line-697"></span><span class="hs-comment">-- | The 'genericTake' function is an overloaded version of 'take', which</span><span>
</span><span id="line-698"></span><span class="hs-comment">-- accepts any 'Integral' value as the number of elements to take.</span><span>
</span><span id="line-699"></span><span id="local-6989586621679533416"><span id="local-6989586621679533417"><span class="annot"><a href="Data.OldList.html#genericTake"><span class="hs-identifier hs-type">genericTake</span></a></span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533417"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533417"><span class="hs-identifier hs-type">i</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533416"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533416"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-700"></span><span id="genericTake"><span class="annot"><span class="annottext">genericTake :: forall i a. Integral i =&gt; i -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#genericTake"><span class="hs-identifier hs-var hs-var">genericTake</span></a></span></span><span> </span><span id="local-6989586621679532683"><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532683"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532683"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">i -&gt; i -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">i
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-701"></span><span class="annot"><a href="Data.OldList.html#genericTake"><span class="hs-identifier hs-var">genericTake</span></a></span><span> </span><span class="annot"><span class="annottext">i
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-702"></span><span class="annot"><a href="Data.OldList.html#genericTake"><span class="hs-identifier hs-var">genericTake</span></a></span><span> </span><span id="local-6989586621679532681"><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532681"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532680"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532680"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532679"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532679"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532680"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">i -&gt; [a] -&gt; [a]
forall i a. Integral i =&gt; i -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#genericTake"><span class="hs-identifier hs-var">genericTake</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532681"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">i -&gt; i -&gt; i
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">i
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532679"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-703"></span><span>
</span><span id="line-704"></span><span class="hs-comment">-- | The 'genericDrop' function is an overloaded version of 'drop', which</span><span>
</span><span id="line-705"></span><span class="hs-comment">-- accepts any 'Integral' value as the number of elements to drop.</span><span>
</span><span id="line-706"></span><span id="local-6989586621679532677"><span id="local-6989586621679532678"><span class="annot"><a href="Data.OldList.html#genericDrop"><span class="hs-identifier hs-type">genericDrop</span></a></span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532678"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679532678"><span class="hs-identifier hs-type">i</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532677"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532677"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-707"></span><span id="genericDrop"><span class="annot"><span class="annottext">genericDrop :: forall i a. Integral i =&gt; i -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#genericDrop"><span class="hs-identifier hs-var hs-var">genericDrop</span></a></span></span><span> </span><span id="local-6989586621679532667"><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532667"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679532666"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532666"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532667"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">i -&gt; i -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">i
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532666"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-708"></span><span class="annot"><a href="Data.OldList.html#genericDrop"><span class="hs-identifier hs-var">genericDrop</span></a></span><span> </span><span class="annot"><span class="annottext">i
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-709"></span><span class="annot"><a href="Data.OldList.html#genericDrop"><span class="hs-identifier hs-var">genericDrop</span></a></span><span> </span><span id="local-6989586621679532665"><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532665"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532664"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532664"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">i -&gt; [a] -&gt; [a]
forall i a. Integral i =&gt; i -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#genericDrop"><span class="hs-identifier hs-var">genericDrop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532665"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">i -&gt; i -&gt; i
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">i
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532664"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-710"></span><span>
</span><span id="line-711"></span><span>
</span><span id="line-712"></span><span class="hs-comment">-- | The 'genericSplitAt' function is an overloaded version of 'splitAt', which</span><span>
</span><span id="line-713"></span><span class="hs-comment">-- accepts any 'Integral' value as the position at which to split.</span><span>
</span><span id="line-714"></span><span id="local-6989586621679533408"><span id="local-6989586621679533409"><span class="annot"><a href="Data.OldList.html#genericSplitAt"><span class="hs-identifier hs-type">genericSplitAt</span></a></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533409"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533409"><span class="hs-identifier hs-type">i</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533408"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533408"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533408"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span></span><span>
</span><span id="line-715"></span><span id="genericSplitAt"><span class="annot"><span class="annottext">genericSplitAt :: forall i a. Integral i =&gt; i -&gt; [a] -&gt; ([a], [a])
</span><a href="Data.OldList.html#genericSplitAt"><span class="hs-identifier hs-var hs-var">genericSplitAt</span></a></span></span><span> </span><span id="local-6989586621679532657"><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532657"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679532656"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532656"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532657"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">i -&gt; i -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">i
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532656"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-716"></span><span class="annot"><a href="Data.OldList.html#genericSplitAt"><span class="hs-identifier hs-var">genericSplitAt</span></a></span><span> </span><span class="annot"><span class="annottext">i
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-717"></span><span class="annot"><a href="Data.OldList.html#genericSplitAt"><span class="hs-identifier hs-var">genericSplitAt</span></a></span><span> </span><span id="local-6989586621679532655"><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532655"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532654"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532654"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532653"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532653"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532654"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532652"><span class="hs-identifier hs-var">xs'</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532651"><span class="hs-identifier hs-var">xs''</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-718"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679532652"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532652"><span class="hs-identifier hs-var">xs'</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532651"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532651"><span class="hs-identifier hs-var">xs''</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">i -&gt; [a] -&gt; ([a], [a])
forall i a. Integral i =&gt; i -&gt; [a] -&gt; ([a], [a])
</span><a href="Data.OldList.html#genericSplitAt"><span class="hs-identifier hs-var">genericSplitAt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532655"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">i -&gt; i -&gt; i
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">i
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532653"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-719"></span><span>
</span><span id="line-720"></span><span class="hs-comment">-- | The 'genericIndex' function is an overloaded version of '!!', which</span><span>
</span><span id="line-721"></span><span class="hs-comment">-- accepts any 'Integral' value as the index.</span><span>
</span><span id="line-722"></span><span id="local-6989586621679533404"><span id="local-6989586621679533405"><span class="annot"><a href="Data.OldList.html#genericIndex"><span class="hs-identifier hs-type">genericIndex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533405"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533404"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533405"><span class="hs-identifier hs-type">i</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533404"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-723"></span><span id="genericIndex"><span class="annot"><span class="annottext">genericIndex :: forall i a. Integral i =&gt; [a] -&gt; i -&gt; a
</span><a href="Data.OldList.html#genericIndex"><span class="hs-identifier hs-var hs-var">genericIndex</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532634"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532634"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="annot"><span class="annottext">i
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532634"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-724"></span><span class="annot"><a href="Data.OldList.html#genericIndex"><span class="hs-identifier hs-var">genericIndex</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532633"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532633"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679532632"><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532632"><span class="hs-identifier hs-var">n</span></a></span></span><span>
</span><span id="line-725"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532632"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">i -&gt; i -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">i
</span><span class="hs-number">0</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; i -&gt; a
forall i a. Integral i =&gt; [a] -&gt; i -&gt; a
</span><a href="Data.OldList.html#genericIndex"><span class="hs-identifier hs-var">genericIndex</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532633"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532632"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">i -&gt; i -&gt; i
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">i
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-726"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; a
forall a. [Char] -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;List.genericIndex: negative argument.&quot;</span></span><span>
</span><span id="line-727"></span><span class="annot"><a href="Data.OldList.html#genericIndex"><span class="hs-identifier hs-var">genericIndex</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">i
</span><span class="hs-identifier">_</span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; a
forall a. [Char] -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;List.genericIndex: index too large.&quot;</span></span><span>
</span><span id="line-728"></span><span>
</span><span id="line-729"></span><span class="hs-comment">-- | The 'genericReplicate' function is an overloaded version of 'replicate',</span><span>
</span><span id="line-730"></span><span class="hs-comment">-- which accepts any 'Integral' value as the number of repetitions to make.</span><span>
</span><span id="line-731"></span><span id="local-6989586621679533400"><span id="local-6989586621679533401"><span class="annot"><a href="Data.OldList.html#genericReplicate"><span class="hs-identifier hs-type">genericReplicate</span></a></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533401"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533401"><span class="hs-identifier hs-type">i</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533400"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533400"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-732"></span><span id="genericReplicate"><span class="annot"><span class="annottext">genericReplicate :: forall i a. Integral i =&gt; i -&gt; a -&gt; [a]
</span><a href="Data.OldList.html#genericReplicate"><span class="hs-identifier hs-var hs-var">genericReplicate</span></a></span></span><span> </span><span id="local-6989586621679532628"><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532628"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679532627"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532627"><span class="hs-identifier hs-var">x</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">i -&gt; [a] -&gt; [a]
forall i a. Integral i =&gt; i -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#genericTake"><span class="hs-identifier hs-var">genericTake</span></a></span><span> </span><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532628"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; [a]
forall a. a -&gt; [a]
</span><a href="GHC.List.html#repeat"><span class="hs-identifier hs-var">repeat</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532627"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-733"></span><span>
</span><span id="line-734"></span><span class="hs-comment">-- | The 'zip4' function takes four lists and returns a list of</span><span>
</span><span id="line-735"></span><span class="hs-comment">-- quadruples, analogous to 'zip'.</span><span>
</span><span id="line-736"></span><span class="hs-comment">-- It is capable of list fusion, but it is restricted to its</span><span>
</span><span id="line-737"></span><span class="hs-comment">-- first list argument and its resulting list.</span><span>
</span><span id="line-738"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.OldList.html#zip4"><span class="hs-pragma hs-type">zip4</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-739"></span><span id="local-6989586621679533393"><span id="local-6989586621679533394"><span id="local-6989586621679533395"><span id="local-6989586621679533396"><span class="annot"><a href="Data.OldList.html#zip4"><span class="hs-identifier hs-type">zip4</span></a></span><span>                    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533396"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533395"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533394"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533393"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533396"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533395"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533394"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533393"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span></span></span></span></span><span>
</span><span id="line-740"></span><span id="zip4"><span class="annot"><span class="annottext">zip4 :: forall a b c d. [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [(a, b, c, d)]
</span><a href="Data.OldList.html#zip4"><span class="hs-identifier hs-var hs-var">zip4</span></a></span></span><span>                    </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c -&gt; d -&gt; (a, b, c, d))
-&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [(a, b, c, d)]
forall a b c d e.
(a -&gt; b -&gt; c -&gt; d -&gt; e) -&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e]
</span><a href="Data.OldList.html#zipWith4"><span class="hs-identifier hs-var">zipWith4</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span>
</span><span id="line-741"></span><span>
</span><span id="line-742"></span><span class="hs-comment">-- | The 'zip5' function takes five lists and returns a list of</span><span>
</span><span id="line-743"></span><span class="hs-comment">-- five-tuples, analogous to 'zip'.</span><span>
</span><span id="line-744"></span><span class="hs-comment">-- It is capable of list fusion, but it is restricted to its</span><span>
</span><span id="line-745"></span><span class="hs-comment">-- first list argument and its resulting list.</span><span>
</span><span id="line-746"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.OldList.html#zip5"><span class="hs-pragma hs-type">zip5</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-747"></span><span id="local-6989586621679533377"><span id="local-6989586621679533378"><span id="local-6989586621679533379"><span id="local-6989586621679533380"><span id="local-6989586621679533381"><span class="annot"><a href="Data.OldList.html#zip5"><span class="hs-identifier hs-type">zip5</span></a></span><span>                    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533381"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533380"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533379"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533378"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533377"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533381"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533380"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533379"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533378"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533377"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span></span></span></span></span></span><span>
</span><span id="line-748"></span><span id="zip5"><span class="annot"><span class="annottext">zip5 :: forall a b c d e.
[a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [(a, b, c, d, e)]
</span><a href="Data.OldList.html#zip5"><span class="hs-identifier hs-var hs-var">zip5</span></a></span></span><span>                    </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; (a, b, c, d, e))
-&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [(a, b, c, d, e)]
forall a b c d e f.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f)
-&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f]
</span><a href="Data.OldList.html#zipWith5"><span class="hs-identifier hs-var">zipWith5</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span>
</span><span id="line-749"></span><span>
</span><span id="line-750"></span><span class="hs-comment">-- | The 'zip6' function takes six lists and returns a list of six-tuples,</span><span>
</span><span id="line-751"></span><span class="hs-comment">-- analogous to 'zip'.</span><span>
</span><span id="line-752"></span><span class="hs-comment">-- It is capable of list fusion, but it is restricted to its</span><span>
</span><span id="line-753"></span><span class="hs-comment">-- first list argument and its resulting list.</span><span>
</span><span id="line-754"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.OldList.html#zip6"><span class="hs-pragma hs-type">zip6</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-755"></span><span id="local-6989586621679533359"><span id="local-6989586621679533360"><span id="local-6989586621679533361"><span id="local-6989586621679533362"><span id="local-6989586621679533363"><span id="local-6989586621679533364"><span class="annot"><a href="Data.OldList.html#zip6"><span class="hs-identifier hs-type">zip6</span></a></span><span>                    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533364"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533363"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533362"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533361"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533360"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533359"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-756"></span><span>                              </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533364"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533363"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533362"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533361"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533360"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533359"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span></span></span></span></span></span></span><span>
</span><span id="line-757"></span><span id="zip6"><span class="annot"><span class="annottext">zip6 :: forall a b c d e f.
[a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [(a, b, c, d, e, f)]
</span><a href="Data.OldList.html#zip6"><span class="hs-identifier hs-var hs-var">zip6</span></a></span></span><span>                    </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; (a, b, c, d, e, f))
-&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [(a, b, c, d, e, f)]
forall a b c d e f g.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g)
-&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [g]
</span><a href="Data.OldList.html#zipWith6"><span class="hs-identifier hs-var">zipWith6</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span>
</span><span id="line-758"></span><span>
</span><span id="line-759"></span><span class="hs-comment">-- | The 'zip7' function takes seven lists and returns a list of</span><span>
</span><span id="line-760"></span><span class="hs-comment">-- seven-tuples, analogous to 'zip'.</span><span>
</span><span id="line-761"></span><span class="hs-comment">-- It is capable of list fusion, but it is restricted to its</span><span>
</span><span id="line-762"></span><span class="hs-comment">-- first list argument and its resulting list.</span><span>
</span><span id="line-763"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.OldList.html#zip7"><span class="hs-pragma hs-type">zip7</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-764"></span><span id="local-6989586621679533338"><span id="local-6989586621679533339"><span id="local-6989586621679533340"><span id="local-6989586621679533341"><span id="local-6989586621679533342"><span id="local-6989586621679533343"><span id="local-6989586621679533344"><span class="annot"><a href="Data.OldList.html#zip7"><span class="hs-identifier hs-type">zip7</span></a></span><span>                    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533344"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533343"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533342"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533341"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533340"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533339"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-765"></span><span>                              </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533338"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533344"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533343"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533342"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533341"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533340"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533339"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533338"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span></span></span></span></span></span></span></span><span>
</span><span id="line-766"></span><span id="zip7"><span class="annot"><span class="annottext">zip7 :: forall a b c d e f g.
[a]
-&gt; [b]
-&gt; [c]
-&gt; [d]
-&gt; [e]
-&gt; [f]
-&gt; [g]
-&gt; [(a, b, c, d, e, f, g)]
</span><a href="Data.OldList.html#zip7"><span class="hs-identifier hs-var hs-var">zip7</span></a></span></span><span>                    </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; (a, b, c, d, e, f, g))
-&gt; [a]
-&gt; [b]
-&gt; [c]
-&gt; [d]
-&gt; [e]
-&gt; [f]
-&gt; [g]
-&gt; [(a, b, c, d, e, f, g)]
forall a b c d e f g h.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h)
-&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [g] -&gt; [h]
</span><a href="Data.OldList.html#zipWith7"><span class="hs-identifier hs-var">zipWith7</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span>
</span><span id="line-767"></span><span>
</span><span id="line-768"></span><span class="hs-comment">-- | The 'zipWith4' function takes a function which combines four</span><span>
</span><span id="line-769"></span><span class="hs-comment">-- elements, as well as four lists and returns a list of their point-wise</span><span>
</span><span id="line-770"></span><span class="hs-comment">-- combination, analogous to 'zipWith'.</span><span>
</span><span id="line-771"></span><span class="hs-comment">-- It is capable of list fusion, but it is restricted to its</span><span>
</span><span id="line-772"></span><span class="hs-comment">-- first list argument and its resulting list.</span><span>
</span><span id="line-773"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#zipWith4"><span class="hs-pragma hs-type">zipWith4</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-774"></span><span id="local-6989586621679533384"><span id="local-6989586621679533385"><span id="local-6989586621679533386"><span id="local-6989586621679533387"><span id="local-6989586621679533388"><span class="annot"><a href="Data.OldList.html#zipWith4"><span class="hs-identifier hs-type">zipWith4</span></a></span><span>                </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533388"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533387"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533386"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533385"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533384"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533388"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533387"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533386"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533385"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533384"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span></span></span></span></span></span><span>
</span><span id="line-775"></span><span id="zipWith4"><span class="annot"><span class="annottext">zipWith4 :: forall a b c d e.
(a -&gt; b -&gt; c -&gt; d -&gt; e) -&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e]
</span><a href="Data.OldList.html#zipWith4"><span class="hs-identifier hs-var hs-var">zipWith4</span></a></span></span><span> </span><span id="local-6989586621679532626"><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e
</span><a href="#local-6989586621679532626"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532625"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532625"><span class="hs-identifier hs-var">a</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532624"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532624"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532623"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532623"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532622"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532622"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532621"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532621"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532620"><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532620"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532619"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532619"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532618"><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532618"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-776"></span><span>                        </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e
</span><a href="#local-6989586621679532626"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532625"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532623"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532621"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532619"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">e -&gt; [e] -&gt; [e]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c -&gt; d -&gt; e) -&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e]
forall a b c d e.
(a -&gt; b -&gt; c -&gt; d -&gt; e) -&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e]
</span><a href="Data.OldList.html#zipWith4"><span class="hs-identifier hs-var">zipWith4</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e
</span><a href="#local-6989586621679532626"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532624"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532622"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532620"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532618"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-777"></span><span class="annot"><a href="Data.OldList.html#zipWith4"><span class="hs-identifier hs-var">zipWith4</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[b]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[c]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[d]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-778"></span><span>
</span><span id="line-779"></span><span class="hs-comment">-- | The 'zipWith5' function takes a function which combines five</span><span>
</span><span id="line-780"></span><span class="hs-comment">-- elements, as well as five lists and returns a list of their point-wise</span><span>
</span><span id="line-781"></span><span class="hs-comment">-- combination, analogous to 'zipWith'.</span><span>
</span><span id="line-782"></span><span class="hs-comment">-- It is capable of list fusion, but it is restricted to its</span><span>
</span><span id="line-783"></span><span class="hs-comment">-- first list argument and its resulting list.</span><span>
</span><span id="line-784"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#zipWith5"><span class="hs-pragma hs-type">zipWith5</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-785"></span><span id="local-6989586621679533366"><span id="local-6989586621679533367"><span id="local-6989586621679533368"><span id="local-6989586621679533369"><span id="local-6989586621679533370"><span id="local-6989586621679533371"><span class="annot"><a href="Data.OldList.html#zipWith5"><span class="hs-identifier hs-type">zipWith5</span></a></span><span>                </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533371"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533370"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533369"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533368"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533367"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533366"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-786"></span><span>                           </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533371"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533370"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533369"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533368"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533367"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533366"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">]</span></span></span></span></span></span></span><span>
</span><span id="line-787"></span><span id="zipWith5"><span class="annot"><span class="annottext">zipWith5 :: forall a b c d e f.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f)
-&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f]
</span><a href="Data.OldList.html#zipWith5"><span class="hs-identifier hs-var hs-var">zipWith5</span></a></span></span><span> </span><span id="local-6989586621679532617"><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f
</span><a href="#local-6989586621679532617"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532616"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532616"><span class="hs-identifier hs-var">a</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532615"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532615"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532614"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532614"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532613"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532613"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532612"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532612"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532611"><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532611"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532610"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532610"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532609"><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532609"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532608"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532608"><span class="hs-identifier hs-var">e</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532607"><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532607"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-788"></span><span>                        </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f
</span><a href="#local-6989586621679532617"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532616"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532614"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532612"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532610"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532608"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">f -&gt; [f] -&gt; [f]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f)
-&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f]
forall a b c d e f.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f)
-&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f]
</span><a href="Data.OldList.html#zipWith5"><span class="hs-identifier hs-var">zipWith5</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f
</span><a href="#local-6989586621679532617"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532615"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532613"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532611"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532609"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532607"><span class="hs-identifier hs-var">es</span></a></span><span>
</span><span id="line-789"></span><span class="annot"><a href="Data.OldList.html#zipWith5"><span class="hs-identifier hs-var">zipWith5</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[b]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[c]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[d]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[e]
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-790"></span><span>
</span><span id="line-791"></span><span class="hs-comment">-- | The 'zipWith6' function takes a function which combines six</span><span>
</span><span id="line-792"></span><span class="hs-comment">-- elements, as well as six lists and returns a list of their point-wise</span><span>
</span><span id="line-793"></span><span class="hs-comment">-- combination, analogous to 'zipWith'.</span><span>
</span><span id="line-794"></span><span class="hs-comment">-- It is capable of list fusion, but it is restricted to its</span><span>
</span><span id="line-795"></span><span class="hs-comment">-- first list argument and its resulting list.</span><span>
</span><span id="line-796"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#zipWith6"><span class="hs-pragma hs-type">zipWith6</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-797"></span><span id="local-6989586621679533346"><span id="local-6989586621679533347"><span id="local-6989586621679533348"><span id="local-6989586621679533349"><span id="local-6989586621679533350"><span id="local-6989586621679533351"><span id="local-6989586621679533352"><span class="annot"><a href="Data.OldList.html#zipWith6"><span class="hs-identifier hs-type">zipWith6</span></a></span><span>                </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533352"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533351"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533350"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533349"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533348"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533347"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533346"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-798"></span><span>                           </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533352"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533351"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533350"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533349"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533348"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533347"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533346"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">]</span></span></span></span></span></span></span></span><span>
</span><span id="line-799"></span><span id="zipWith6"><span class="annot"><span class="annottext">zipWith6 :: forall a b c d e f g.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g)
-&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [g]
</span><a href="Data.OldList.html#zipWith6"><span class="hs-identifier hs-var hs-var">zipWith6</span></a></span></span><span> </span><span id="local-6989586621679532606"><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g
</span><a href="#local-6989586621679532606"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532605"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532605"><span class="hs-identifier hs-var">a</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532604"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532604"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532603"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532603"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532602"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532602"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532601"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532601"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532600"><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532600"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532599"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532599"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532598"><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532598"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532597"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532597"><span class="hs-identifier hs-var">e</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532596"><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532596"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532595"><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532595"><span class="hs-identifier hs-var">f</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532594"><span class="annot"><span class="annottext">[f]
</span><a href="#local-6989586621679532594"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-800"></span><span>                        </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g
</span><a href="#local-6989586621679532606"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532605"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532603"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532601"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532599"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532597"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532595"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">g -&gt; [g] -&gt; [g]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g)
-&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [g]
forall a b c d e f g.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g)
-&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [g]
</span><a href="Data.OldList.html#zipWith6"><span class="hs-identifier hs-var">zipWith6</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g
</span><a href="#local-6989586621679532606"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532604"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532602"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532600"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532598"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532596"><span class="hs-identifier hs-var">es</span></a></span><span> </span><span class="annot"><span class="annottext">[f]
</span><a href="#local-6989586621679532594"><span class="hs-identifier hs-var">fs</span></a></span><span>
</span><span id="line-801"></span><span class="annot"><a href="Data.OldList.html#zipWith6"><span class="hs-identifier hs-var">zipWith6</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[b]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[c]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[d]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[e]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[f]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-802"></span><span>
</span><span id="line-803"></span><span class="hs-comment">-- | The 'zipWith7' function takes a function which combines seven</span><span>
</span><span id="line-804"></span><span class="hs-comment">-- elements, as well as seven lists and returns a list of their point-wise</span><span>
</span><span id="line-805"></span><span class="hs-comment">-- combination, analogous to 'zipWith'.</span><span>
</span><span id="line-806"></span><span class="hs-comment">-- It is capable of list fusion, but it is restricted to its</span><span>
</span><span id="line-807"></span><span class="hs-comment">-- first list argument and its resulting list.</span><span>
</span><span id="line-808"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#zipWith7"><span class="hs-pragma hs-type">zipWith7</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-809"></span><span id="local-6989586621679533323"><span id="local-6989586621679533324"><span id="local-6989586621679533325"><span id="local-6989586621679533326"><span id="local-6989586621679533327"><span id="local-6989586621679533328"><span id="local-6989586621679533329"><span id="local-6989586621679533330"><span class="annot"><a href="Data.OldList.html#zipWith7"><span class="hs-identifier hs-type">zipWith7</span></a></span><span>                </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533330"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533329"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533328"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533327"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533326"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533325"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533324"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533323"><span class="hs-identifier hs-type">h</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-810"></span><span>                           </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533330"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533329"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533328"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533327"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533326"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533325"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533324"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533323"><span class="hs-identifier hs-type">h</span></a></span><span class="hs-special">]</span></span></span></span></span></span></span></span></span><span>
</span><span id="line-811"></span><span id="zipWith7"><span class="annot"><span class="annottext">zipWith7 :: forall a b c d e f g h.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h)
-&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [g] -&gt; [h]
</span><a href="Data.OldList.html#zipWith7"><span class="hs-identifier hs-var hs-var">zipWith7</span></a></span></span><span> </span><span id="local-6989586621679532593"><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h
</span><a href="#local-6989586621679532593"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532592"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532592"><span class="hs-identifier hs-var">a</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532591"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532591"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532590"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532590"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532589"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532589"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532588"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532588"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532587"><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532587"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532586"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532586"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532585"><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532585"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532584"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532584"><span class="hs-identifier hs-var">e</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532583"><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532583"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532582"><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532582"><span class="hs-identifier hs-var">f</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532581"><span class="annot"><span class="annottext">[f]
</span><a href="#local-6989586621679532581"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532580"><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679532580"><span class="hs-identifier hs-var">g</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532579"><span class="annot"><span class="annottext">[g]
</span><a href="#local-6989586621679532579"><span class="hs-identifier hs-var">gs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-812"></span><span>                   </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h
</span><a href="#local-6989586621679532593"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532592"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532590"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532588"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532586"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532584"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532582"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679532580"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">h -&gt; [h] -&gt; [h]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h)
-&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [g] -&gt; [h]
forall a b c d e f g h.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h)
-&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [g] -&gt; [h]
</span><a href="Data.OldList.html#zipWith7"><span class="hs-identifier hs-var">zipWith7</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h
</span><a href="#local-6989586621679532593"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532591"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532589"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532587"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532585"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532583"><span class="hs-identifier hs-var">es</span></a></span><span> </span><span class="annot"><span class="annottext">[f]
</span><a href="#local-6989586621679532581"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="annot"><span class="annottext">[g]
</span><a href="#local-6989586621679532579"><span class="hs-identifier hs-var">gs</span></a></span><span>
</span><span id="line-813"></span><span class="annot"><a href="Data.OldList.html#zipWith7"><span class="hs-identifier hs-var">zipWith7</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[b]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[c]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[d]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[e]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[f]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[g]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-814"></span><span>
</span><span id="line-815"></span><span class="hs-comment">{-
Functions and rules for fusion of zipWith4, zipWith5, zipWith6 and zipWith7.
The principle is the same as for zip and zipWith in GHC.List:
Turn zipWithX into a version in which the first argument and the result
can be fused. Turn it back into the original function if no fusion happens.
-}</span><span>
</span><span id="line-821"></span><span>
</span><span id="line-822"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#zipWith4FB"><span class="hs-pragma hs-type">zipWith4FB</span></a></span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-comment">-- See Note [Inline FB functions]</span><span>
</span><span id="line-823"></span><span id="local-6989586621679533289"><span id="local-6989586621679533290"><span id="local-6989586621679533291"><span id="local-6989586621679533292"><span id="local-6989586621679533293"><span id="local-6989586621679533294"><span id="local-6989586621679533295"><span class="annot"><a href="Data.OldList.html#zipWith4FB"><span class="hs-identifier hs-type">zipWith4FB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533295"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533294"><span class="hs-identifier hs-type">xs</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533293"><span class="hs-identifier hs-type">xs'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533292"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533291"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533290"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533289"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533295"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-824"></span><span>              </span><span class="annot"><a href="#local-6989586621679533292"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533291"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533290"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533289"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533294"><span class="hs-identifier hs-type">xs</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533293"><span class="hs-identifier hs-type">xs'</span></a></span></span></span></span></span></span></span></span><span>
</span><span id="line-825"></span><span id="zipWith4FB"><span class="annot"><span class="annottext">zipWith4FB :: forall e xs xs' a b c d.
(e -&gt; xs -&gt; xs')
-&gt; (a -&gt; b -&gt; c -&gt; d -&gt; e) -&gt; a -&gt; b -&gt; c -&gt; d -&gt; xs -&gt; xs'
</span><a href="Data.OldList.html#zipWith4FB"><span class="hs-identifier hs-var hs-var">zipWith4FB</span></a></span></span><span> </span><span id="local-6989586621679532577"><span class="annot"><span class="annottext">e -&gt; xs -&gt; xs'
</span><a href="#local-6989586621679532577"><span class="hs-identifier hs-var">cons</span></a></span></span><span> </span><span id="local-6989586621679532576"><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e
</span><a href="#local-6989586621679532576"><span class="hs-identifier hs-var">func</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679532575"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532575"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679532574"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532574"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679532573"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532573"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679532572"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532572"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679532571"><span class="annot"><span class="annottext">xs
</span><a href="#local-6989586621679532571"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e
</span><a href="#local-6989586621679532576"><span class="hs-identifier hs-var">func</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532575"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532574"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532573"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532572"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">e -&gt; xs -&gt; xs'
</span><a href="#local-6989586621679532577"><span class="hs-operator hs-var">`cons`</span></a></span><span> </span><span class="annot"><span class="annottext">xs
</span><a href="#local-6989586621679532571"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-826"></span><span>
</span><span id="line-827"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#zipWith5FB"><span class="hs-pragma hs-type">zipWith5FB</span></a></span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-comment">-- See Note [Inline FB functions]</span><span>
</span><span id="line-828"></span><span id="local-6989586621679533274"><span id="local-6989586621679533275"><span id="local-6989586621679533276"><span id="local-6989586621679533277"><span id="local-6989586621679533278"><span id="local-6989586621679533279"><span id="local-6989586621679533280"><span id="local-6989586621679533281"><span class="annot"><a href="Data.OldList.html#zipWith5FB"><span class="hs-identifier hs-type">zipWith5FB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533281"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533280"><span class="hs-identifier hs-type">xs</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533279"><span class="hs-identifier hs-type">xs'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533278"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533277"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533276"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533275"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533274"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533281"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-829"></span><span>              </span><span class="annot"><a href="#local-6989586621679533278"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533277"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533276"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533275"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533274"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533280"><span class="hs-identifier hs-type">xs</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533279"><span class="hs-identifier hs-type">xs'</span></a></span></span></span></span></span></span></span></span></span><span>
</span><span id="line-830"></span><span id="zipWith5FB"><span class="annot"><span class="annottext">zipWith5FB :: forall f xs xs' a b c d e.
(f -&gt; xs -&gt; xs')
-&gt; (a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f)
-&gt; a
-&gt; b
-&gt; c
-&gt; d
-&gt; e
-&gt; xs
-&gt; xs'
</span><a href="Data.OldList.html#zipWith5FB"><span class="hs-identifier hs-var hs-var">zipWith5FB</span></a></span></span><span> </span><span id="local-6989586621679532569"><span class="annot"><span class="annottext">f -&gt; xs -&gt; xs'
</span><a href="#local-6989586621679532569"><span class="hs-identifier hs-var">cons</span></a></span></span><span> </span><span id="local-6989586621679532568"><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f
</span><a href="#local-6989586621679532568"><span class="hs-identifier hs-var">func</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679532567"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532567"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679532566"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532566"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679532565"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532565"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679532564"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532564"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679532563"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532563"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621679532562"><span class="annot"><span class="annottext">xs
</span><a href="#local-6989586621679532562"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f
</span><a href="#local-6989586621679532568"><span class="hs-identifier hs-var">func</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532567"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532566"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532565"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532564"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532563"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">f -&gt; xs -&gt; xs'
</span><a href="#local-6989586621679532569"><span class="hs-operator hs-var">`cons`</span></a></span><span> </span><span class="annot"><span class="annottext">xs
</span><a href="#local-6989586621679532562"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-831"></span><span>
</span><span id="line-832"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#zipWith6FB"><span class="hs-pragma hs-type">zipWith6FB</span></a></span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-comment">-- See Note [Inline FB functions]</span><span>
</span><span id="line-833"></span><span id="local-6989586621679533257"><span id="local-6989586621679533258"><span id="local-6989586621679533259"><span id="local-6989586621679533260"><span id="local-6989586621679533261"><span id="local-6989586621679533262"><span id="local-6989586621679533263"><span id="local-6989586621679533264"><span id="local-6989586621679533265"><span class="annot"><a href="Data.OldList.html#zipWith6FB"><span class="hs-identifier hs-type">zipWith6FB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533265"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533264"><span class="hs-identifier hs-type">xs</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533263"><span class="hs-identifier hs-type">xs'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533262"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533261"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533260"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533259"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533258"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533257"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533265"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-834"></span><span>              </span><span class="annot"><a href="#local-6989586621679533262"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533261"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533260"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533259"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533258"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533257"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533264"><span class="hs-identifier hs-type">xs</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533263"><span class="hs-identifier hs-type">xs'</span></a></span></span></span></span></span></span></span></span></span></span><span>
</span><span id="line-835"></span><span id="zipWith6FB"><span class="annot"><span class="annottext">zipWith6FB :: forall g xs xs' a b c d e f.
(g -&gt; xs -&gt; xs')
-&gt; (a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g)
-&gt; a
-&gt; b
-&gt; c
-&gt; d
-&gt; e
-&gt; f
-&gt; xs
-&gt; xs'
</span><a href="Data.OldList.html#zipWith6FB"><span class="hs-identifier hs-var hs-var">zipWith6FB</span></a></span></span><span> </span><span id="local-6989586621679532560"><span class="annot"><span class="annottext">g -&gt; xs -&gt; xs'
</span><a href="#local-6989586621679532560"><span class="hs-identifier hs-var">cons</span></a></span></span><span> </span><span id="local-6989586621679532559"><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g
</span><a href="#local-6989586621679532559"><span class="hs-identifier hs-var">func</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679532558"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532558"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679532557"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532557"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679532556"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532556"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679532555"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532555"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679532554"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532554"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621679532553"><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532553"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679532552"><span class="annot"><span class="annottext">xs
</span><a href="#local-6989586621679532552"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g
</span><a href="#local-6989586621679532559"><span class="hs-identifier hs-var">func</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532558"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532557"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532556"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532555"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532554"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532553"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">g -&gt; xs -&gt; xs'
</span><a href="#local-6989586621679532560"><span class="hs-operator hs-var">`cons`</span></a></span><span> </span><span class="annot"><span class="annottext">xs
</span><a href="#local-6989586621679532552"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-836"></span><span>
</span><span id="line-837"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#zipWith7FB"><span class="hs-pragma hs-type">zipWith7FB</span></a></span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-comment">-- See Note [Inline FB functions]</span><span>
</span><span id="line-838"></span><span id="local-6989586621679533238"><span id="local-6989586621679533239"><span id="local-6989586621679533240"><span id="local-6989586621679533241"><span id="local-6989586621679533242"><span id="local-6989586621679533243"><span id="local-6989586621679533244"><span id="local-6989586621679533245"><span id="local-6989586621679533246"><span id="local-6989586621679533247"><span class="annot"><a href="Data.OldList.html#zipWith7FB"><span class="hs-identifier hs-type">zipWith7FB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533247"><span class="hs-identifier hs-type">h</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533246"><span class="hs-identifier hs-type">xs</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533245"><span class="hs-identifier hs-type">xs'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533244"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533243"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533242"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533241"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533240"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533239"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533238"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533247"><span class="hs-identifier hs-type">h</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-839"></span><span>              </span><span class="annot"><a href="#local-6989586621679533244"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533243"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533242"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533241"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533240"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533239"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533238"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533246"><span class="hs-identifier hs-type">xs</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533245"><span class="hs-identifier hs-type">xs'</span></a></span></span></span></span></span></span></span></span></span></span></span><span>
</span><span id="line-840"></span><span id="zipWith7FB"><span class="annot"><span class="annottext">zipWith7FB :: forall h xs xs' a b c d e f g.
(h -&gt; xs -&gt; xs')
-&gt; (a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h)
-&gt; a
-&gt; b
-&gt; c
-&gt; d
-&gt; e
-&gt; f
-&gt; g
-&gt; xs
-&gt; xs'
</span><a href="Data.OldList.html#zipWith7FB"><span class="hs-identifier hs-var hs-var">zipWith7FB</span></a></span></span><span> </span><span id="local-6989586621679532550"><span class="annot"><span class="annottext">h -&gt; xs -&gt; xs'
</span><a href="#local-6989586621679532550"><span class="hs-identifier hs-var">cons</span></a></span></span><span> </span><span id="local-6989586621679532549"><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h
</span><a href="#local-6989586621679532549"><span class="hs-identifier hs-var">func</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679532548"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532548"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679532547"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532547"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679532546"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532546"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679532545"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532545"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679532544"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532544"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621679532543"><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532543"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679532542"><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679532542"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621679532541"><span class="annot"><span class="annottext">xs
</span><a href="#local-6989586621679532541"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h
</span><a href="#local-6989586621679532549"><span class="hs-identifier hs-var">func</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532548"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532547"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532546"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532545"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532544"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532543"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679532542"><span class="hs-identifier hs-var">g</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">h -&gt; xs -&gt; xs'
</span><a href="#local-6989586621679532550"><span class="hs-operator hs-var">`cons`</span></a></span><span> </span><span class="annot"><span class="annottext">xs
</span><a href="#local-6989586621679532541"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-841"></span><span>
</span><span id="line-842"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#foldr4"><span class="hs-pragma hs-type">foldr4</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-843"></span><span id="local-6989586621679533223"><span id="local-6989586621679533224"><span id="local-6989586621679533225"><span id="local-6989586621679533226"><span id="local-6989586621679533227"><span class="annot"><a href="Data.OldList.html#foldr4"><span class="hs-identifier hs-type">foldr4</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533227"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533226"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533225"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533224"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533223"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533223"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-844"></span><span>          </span><span class="annot"><a href="#local-6989586621679533223"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533227"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533226"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533225"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533224"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533223"><span class="hs-identifier hs-type">e</span></a></span></span></span></span></span></span><span>
</span><span id="line-845"></span><span id="foldr4"><span class="annot"><span class="annottext">foldr4 :: forall a b c d e.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; e) -&gt; e -&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; e
</span><a href="Data.OldList.html#foldr4"><span class="hs-identifier hs-var hs-var">foldr4</span></a></span></span><span> </span><span id="local-6989586621679532539"><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; e
</span><a href="#local-6989586621679532539"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679532538"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532538"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; e
</span><a href="#local-6989586621679532537"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-846"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-847"></span><span>    </span><span id="local-6989586621679532537"><span class="annot"><span class="annottext">go :: [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; e
</span><a href="#local-6989586621679532537"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532536"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532536"><span class="hs-identifier hs-var">a</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532535"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532535"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532534"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532534"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532533"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532533"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532532"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532532"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532531"><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532531"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532530"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532530"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532529"><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532529"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; e
</span><a href="#local-6989586621679532539"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532536"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532534"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532532"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532530"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; e
</span><a href="#local-6989586621679532537"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532535"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532533"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532531"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532529"><span class="hs-identifier hs-var">ds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-848"></span><span>    </span><span class="annot"><a href="#local-6989586621679532537"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[b]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[c]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[d]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532538"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-849"></span><span>
</span><span id="line-850"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#foldr5"><span class="hs-pragma hs-type">foldr5</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-851"></span><span id="local-6989586621679533212"><span id="local-6989586621679533213"><span id="local-6989586621679533214"><span id="local-6989586621679533215"><span id="local-6989586621679533216"><span id="local-6989586621679533217"><span class="annot"><a href="Data.OldList.html#foldr5"><span class="hs-identifier hs-type">foldr5</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533217"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533216"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533215"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533214"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533213"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533212"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533212"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-852"></span><span>          </span><span class="annot"><a href="#local-6989586621679533212"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533217"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533216"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533215"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533214"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533213"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533212"><span class="hs-identifier hs-type">f</span></a></span></span></span></span></span></span></span><span>
</span><span id="line-853"></span><span id="foldr5"><span class="annot"><span class="annottext">foldr5 :: forall a b c d e f.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; f)
-&gt; f -&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; f
</span><a href="Data.OldList.html#foldr5"><span class="hs-identifier hs-var hs-var">foldr5</span></a></span></span><span> </span><span id="local-6989586621679532527"><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; f
</span><a href="#local-6989586621679532527"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679532526"><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532526"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; f
</span><a href="#local-6989586621679532525"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-854"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-855"></span><span>    </span><span id="local-6989586621679532525"><span class="annot"><span class="annottext">go :: [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; f
</span><a href="#local-6989586621679532525"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532524"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532524"><span class="hs-identifier hs-var">a</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532523"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532523"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532522"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532522"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532521"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532521"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532520"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532520"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532519"><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532519"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532518"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532518"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532517"><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532517"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532516"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532516"><span class="hs-identifier hs-var">e</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532515"><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532515"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; f
</span><a href="#local-6989586621679532527"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532524"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532522"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532520"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532518"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532516"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; f
</span><a href="#local-6989586621679532525"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532523"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532521"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532519"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532517"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532515"><span class="hs-identifier hs-var">es</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-856"></span><span>    </span><span class="annot"><a href="#local-6989586621679532525"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[b]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[c]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[d]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[e]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532526"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-857"></span><span>
</span><span id="line-858"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#foldr6"><span class="hs-pragma hs-type">foldr6</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-859"></span><span id="local-6989586621679533199"><span id="local-6989586621679533200"><span id="local-6989586621679533201"><span id="local-6989586621679533202"><span id="local-6989586621679533203"><span id="local-6989586621679533204"><span id="local-6989586621679533205"><span class="annot"><a href="Data.OldList.html#foldr6"><span class="hs-identifier hs-type">foldr6</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533205"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533204"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533203"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533202"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533201"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533200"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533199"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533199"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-860"></span><span>          </span><span class="annot"><a href="#local-6989586621679533199"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533205"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533204"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533203"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533202"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533201"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533200"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533199"><span class="hs-identifier hs-type">g</span></a></span></span></span></span></span></span></span></span><span>
</span><span id="line-861"></span><span id="foldr6"><span class="annot"><span class="annottext">foldr6 :: forall a b c d e f g.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; g)
-&gt; g -&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; g
</span><a href="Data.OldList.html#foldr6"><span class="hs-identifier hs-var hs-var">foldr6</span></a></span></span><span> </span><span id="local-6989586621679532513"><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; g
</span><a href="#local-6989586621679532513"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679532512"><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679532512"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; g
</span><a href="#local-6989586621679532511"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-862"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-863"></span><span>    </span><span id="local-6989586621679532511"><span class="annot"><span class="annottext">go :: [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; g
</span><a href="#local-6989586621679532511"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532510"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532510"><span class="hs-identifier hs-var">a</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532509"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532509"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532508"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532508"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532507"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532507"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532506"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532506"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532505"><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532505"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532504"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532504"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532503"><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532503"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532502"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532502"><span class="hs-identifier hs-var">e</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532501"><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532501"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532500"><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532500"><span class="hs-identifier hs-var">f</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532499"><span class="annot"><span class="annottext">[f]
</span><a href="#local-6989586621679532499"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; g
</span><a href="#local-6989586621679532513"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532510"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532508"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532506"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532504"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532502"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532500"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-864"></span><span>        </span><span class="annot"><span class="annottext">[a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; g
</span><a href="#local-6989586621679532511"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532509"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532507"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532505"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532503"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532501"><span class="hs-identifier hs-var">es</span></a></span><span> </span><span class="annot"><span class="annottext">[f]
</span><a href="#local-6989586621679532499"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-865"></span><span>    </span><span class="annot"><a href="#local-6989586621679532511"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[b]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[c]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[d]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[e]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[f]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679532512"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-866"></span><span>
</span><span id="line-867"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#foldr7"><span class="hs-pragma hs-type">foldr7</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-868"></span><span id="local-6989586621679533184"><span id="local-6989586621679533185"><span id="local-6989586621679533186"><span id="local-6989586621679533187"><span id="local-6989586621679533188"><span id="local-6989586621679533189"><span id="local-6989586621679533190"><span id="local-6989586621679533191"><span class="annot"><a href="Data.OldList.html#foldr7"><span class="hs-identifier hs-type">foldr7</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533191"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533190"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533189"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533188"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533187"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533186"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533185"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533184"><span class="hs-identifier hs-type">h</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533184"><span class="hs-identifier hs-type">h</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-869"></span><span>          </span><span class="annot"><a href="#local-6989586621679533184"><span class="hs-identifier hs-type">h</span></a></span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533191"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533190"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533189"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533188"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533187"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533186"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533185"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533184"><span class="hs-identifier hs-type">h</span></a></span></span></span></span></span></span></span></span></span><span>
</span><span id="line-870"></span><span id="foldr7"><span class="annot"><span class="annottext">foldr7 :: forall a b c d e f g h.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h -&gt; h)
-&gt; h -&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [g] -&gt; h
</span><a href="Data.OldList.html#foldr7"><span class="hs-identifier hs-var hs-var">foldr7</span></a></span></span><span> </span><span id="local-6989586621679532497"><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h -&gt; h
</span><a href="#local-6989586621679532497"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679532496"><span class="annot"><span class="annottext">h
</span><a href="#local-6989586621679532496"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [g] -&gt; h
</span><a href="#local-6989586621679532495"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-871"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-872"></span><span>    </span><span id="local-6989586621679532495"><span class="annot"><span class="annottext">go :: [a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [g] -&gt; h
</span><a href="#local-6989586621679532495"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532494"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532494"><span class="hs-identifier hs-var">a</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532493"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532493"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532492"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532492"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532491"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532491"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532490"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532490"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532489"><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532489"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532488"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532488"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532487"><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532487"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532486"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532486"><span class="hs-identifier hs-var">e</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532485"><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532485"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532484"><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532484"><span class="hs-identifier hs-var">f</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532483"><span class="annot"><span class="annottext">[f]
</span><a href="#local-6989586621679532483"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532482"><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679532482"><span class="hs-identifier hs-var">g</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532481"><span class="annot"><span class="annottext">[g]
</span><a href="#local-6989586621679532481"><span class="hs-identifier hs-var">gs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h -&gt; h
</span><a href="#local-6989586621679532497"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532494"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532492"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532490"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532488"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532486"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532484"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679532482"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-873"></span><span>        </span><span class="annot"><span class="annottext">[a] -&gt; [b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [g] -&gt; h
</span><a href="#local-6989586621679532495"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532493"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532491"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532489"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532487"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532485"><span class="hs-identifier hs-var">es</span></a></span><span> </span><span class="annot"><span class="annottext">[f]
</span><a href="#local-6989586621679532483"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="annot"><span class="annottext">[g]
</span><a href="#local-6989586621679532481"><span class="hs-identifier hs-var">gs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-874"></span><span>    </span><span class="annot"><a href="#local-6989586621679532495"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[b]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[c]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[d]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[e]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[f]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[g]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">h
</span><a href="#local-6989586621679532496"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-875"></span><span>
</span><span id="line-876"></span><span id="local-6989586621679533170"><span id="local-6989586621679533171"><span id="local-6989586621679533172"><span id="local-6989586621679533173"><span id="local-6989586621679533174"><span id="local-6989586621679533175"><span class="annot"><a href="Data.OldList.html#foldr4_left"><span class="hs-identifier hs-type">foldr4_left</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533175"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533174"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533173"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533172"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533171"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533170"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-877"></span><span>               </span><span class="annot"><a href="#local-6989586621679533170"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533175"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533174"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533173"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533172"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533171"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">)</span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-878"></span><span>               </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533174"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533173"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533172"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533170"><span class="hs-identifier hs-type">f</span></a></span></span></span></span></span></span></span><span>
</span><span id="line-879"></span><span id="foldr4_left"><span class="annot"><span class="annottext">foldr4_left :: forall a b c d e f.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f)
-&gt; f -&gt; a -&gt; ([b] -&gt; [c] -&gt; [d] -&gt; e) -&gt; [b] -&gt; [c] -&gt; [d] -&gt; f
</span><a href="Data.OldList.html#foldr4_left"><span class="hs-identifier hs-var hs-var">foldr4_left</span></a></span></span><span> </span><span id="local-6989586621679532479"><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f
</span><a href="#local-6989586621679532479"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679532478"><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532478"><span class="hs-identifier hs-var">_z</span></a></span></span><span> </span><span id="local-6989586621679532477"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532477"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679532476"><span class="annot"><span class="annottext">[b] -&gt; [c] -&gt; [d] -&gt; e
</span><a href="#local-6989586621679532476"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532475"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532475"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532474"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532474"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532473"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532473"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532472"><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532472"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532471"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532471"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532470"><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532470"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f
</span><a href="#local-6989586621679532479"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532477"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532475"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532473"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532471"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[b] -&gt; [c] -&gt; [d] -&gt; e
</span><a href="#local-6989586621679532476"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532474"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532472"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532470"><span class="hs-identifier hs-var">ds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-880"></span><span class="annot"><a href="Data.OldList.html#foldr4_left"><span class="hs-identifier hs-var">foldr4_left</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621679532469"><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532469"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[b] -&gt; [c] -&gt; [d] -&gt; e
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[b]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[c]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[d]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532469"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-881"></span><span>
</span><span id="line-882"></span><span id="local-6989586621679533157"><span id="local-6989586621679533158"><span id="local-6989586621679533159"><span id="local-6989586621679533160"><span id="local-6989586621679533161"><span id="local-6989586621679533162"><span id="local-6989586621679533163"><span class="annot"><a href="Data.OldList.html#foldr5_left"><span class="hs-identifier hs-type">foldr5_left</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533163"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533162"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533161"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533160"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533159"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533158"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533157"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-883"></span><span>               </span><span class="annot"><a href="#local-6989586621679533157"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533163"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533162"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533161"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533160"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533159"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533158"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-884"></span><span>               </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533162"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533161"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533160"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533159"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533157"><span class="hs-identifier hs-type">g</span></a></span></span></span></span></span></span></span></span><span>
</span><span id="line-885"></span><span id="foldr5_left"><span class="annot"><span class="annottext">foldr5_left :: forall a b c d e f g.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g)
-&gt; g
-&gt; a
-&gt; ([b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; f)
-&gt; [b]
-&gt; [c]
-&gt; [d]
-&gt; [e]
-&gt; g
</span><a href="Data.OldList.html#foldr5_left"><span class="hs-identifier hs-var hs-var">foldr5_left</span></a></span></span><span> </span><span id="local-6989586621679532467"><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g
</span><a href="#local-6989586621679532467"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679532466"><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679532466"><span class="hs-identifier hs-var">_z</span></a></span></span><span> </span><span id="local-6989586621679532465"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532465"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679532464"><span class="annot"><span class="annottext">[b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; f
</span><a href="#local-6989586621679532464"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532463"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532463"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532462"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532462"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532461"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532461"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532460"><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532460"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532459"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532459"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532458"><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532458"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532457"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532457"><span class="hs-identifier hs-var">e</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532456"><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532456"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g
</span><a href="#local-6989586621679532467"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532465"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532463"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532461"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532459"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532457"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; f
</span><a href="#local-6989586621679532464"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532462"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532460"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532458"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532456"><span class="hs-identifier hs-var">es</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-886"></span><span class="annot"><a href="Data.OldList.html#foldr5_left"><span class="hs-identifier hs-var">foldr5_left</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621679532455"><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679532455"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; f
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[b]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[c]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[d]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[e]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679532455"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-887"></span><span>
</span><span id="line-888"></span><span id="local-6989586621679533142"><span id="local-6989586621679533143"><span id="local-6989586621679533144"><span id="local-6989586621679533145"><span id="local-6989586621679533146"><span id="local-6989586621679533147"><span id="local-6989586621679533148"><span id="local-6989586621679533149"><span class="annot"><a href="Data.OldList.html#foldr6_left"><span class="hs-identifier hs-type">foldr6_left</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533149"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533148"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533147"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533146"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533145"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533144"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533143"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533142"><span class="hs-identifier hs-type">h</span></a></span><span class="hs-special">)</span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-889"></span><span>               </span><span class="annot"><a href="#local-6989586621679533142"><span class="hs-identifier hs-type">h</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533149"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533148"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533147"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533146"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533145"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533144"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533143"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-890"></span><span>               </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533148"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533147"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533146"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533145"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533144"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533142"><span class="hs-identifier hs-type">h</span></a></span></span></span></span></span></span></span></span></span><span>
</span><span id="line-891"></span><span id="foldr6_left"><span class="annot"><span class="annottext">foldr6_left :: forall a b c d e f g h.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h)
-&gt; h
-&gt; a
-&gt; ([b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; g)
-&gt; [b]
-&gt; [c]
-&gt; [d]
-&gt; [e]
-&gt; [f]
-&gt; h
</span><a href="Data.OldList.html#foldr6_left"><span class="hs-identifier hs-var hs-var">foldr6_left</span></a></span></span><span> </span><span id="local-6989586621679532453"><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h
</span><a href="#local-6989586621679532453"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679532452"><span class="annot"><span class="annottext">h
</span><a href="#local-6989586621679532452"><span class="hs-identifier hs-var">_z</span></a></span></span><span> </span><span id="local-6989586621679532451"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532451"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679532450"><span class="annot"><span class="annottext">[b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; g
</span><a href="#local-6989586621679532450"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532449"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532449"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532448"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532448"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532447"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532447"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532446"><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532446"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532445"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532445"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532444"><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532444"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532443"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532443"><span class="hs-identifier hs-var">e</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532442"><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532442"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532441"><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532441"><span class="hs-identifier hs-var">f</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532440"><span class="annot"><span class="annottext">[f]
</span><a href="#local-6989586621679532440"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-892"></span><span>    </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h
</span><a href="#local-6989586621679532453"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532451"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532449"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532447"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532445"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532443"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532441"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; g
</span><a href="#local-6989586621679532450"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532448"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532446"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532444"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532442"><span class="hs-identifier hs-var">es</span></a></span><span> </span><span class="annot"><span class="annottext">[f]
</span><a href="#local-6989586621679532440"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-893"></span><span class="annot"><a href="Data.OldList.html#foldr6_left"><span class="hs-identifier hs-var">foldr6_left</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621679532439"><span class="annot"><span class="annottext">h
</span><a href="#local-6989586621679532439"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; g
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[b]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[c]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[d]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[e]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[f]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">h
</span><a href="#local-6989586621679532439"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-894"></span><span>
</span><span id="line-895"></span><span id="local-6989586621679533125"><span id="local-6989586621679533126"><span id="local-6989586621679533127"><span id="local-6989586621679533128"><span id="local-6989586621679533129"><span id="local-6989586621679533130"><span id="local-6989586621679533131"><span id="local-6989586621679533132"><span id="local-6989586621679533133"><span class="annot"><a href="Data.OldList.html#foldr7_left"><span class="hs-identifier hs-type">foldr7_left</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533133"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533132"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533131"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533130"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533129"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533128"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533127"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533126"><span class="hs-identifier hs-type">h</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533125"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">)</span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-896"></span><span>               </span><span class="annot"><a href="#local-6989586621679533125"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533133"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533132"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533131"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533130"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533129"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533128"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533127"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533126"><span class="hs-identifier hs-type">h</span></a></span><span class="hs-special">)</span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-897"></span><span>               </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533132"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533131"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533130"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533129"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533128"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533127"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">]</span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621679533125"><span class="hs-identifier hs-type">i</span></a></span></span></span></span></span></span></span></span></span></span><span>
</span><span id="line-898"></span><span id="foldr7_left"><span class="annot"><span class="annottext">foldr7_left :: forall a b c d e f g h i.
(a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h -&gt; i)
-&gt; i
-&gt; a
-&gt; ([b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [g] -&gt; h)
-&gt; [b]
-&gt; [c]
-&gt; [d]
-&gt; [e]
-&gt; [f]
-&gt; [g]
-&gt; i
</span><a href="Data.OldList.html#foldr7_left"><span class="hs-identifier hs-var hs-var">foldr7_left</span></a></span></span><span> </span><span id="local-6989586621679532437"><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h -&gt; i
</span><a href="#local-6989586621679532437"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679532436"><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532436"><span class="hs-identifier hs-var">_z</span></a></span></span><span> </span><span id="local-6989586621679532435"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532435"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679532434"><span class="annot"><span class="annottext">[b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [g] -&gt; h
</span><a href="#local-6989586621679532434"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532433"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532433"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532432"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532432"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532431"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532431"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532430"><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532430"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532429"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532429"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532428"><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532428"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532427"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532427"><span class="hs-identifier hs-var">e</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532426"><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532426"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532425"><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532425"><span class="hs-identifier hs-var">f</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532424"><span class="annot"><span class="annottext">[f]
</span><a href="#local-6989586621679532424"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532423"><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679532423"><span class="hs-identifier hs-var">g</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532422"><span class="annot"><span class="annottext">[g]
</span><a href="#local-6989586621679532422"><span class="hs-identifier hs-var">gs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-899"></span><span>    </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h -&gt; i
</span><a href="#local-6989586621679532437"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532435"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532433"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532431"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532429"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532427"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532425"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679532423"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [g] -&gt; h
</span><a href="#local-6989586621679532434"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532432"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532430"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532428"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532426"><span class="hs-identifier hs-var">es</span></a></span><span> </span><span class="annot"><span class="annottext">[f]
</span><a href="#local-6989586621679532424"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="annot"><span class="annottext">[g]
</span><a href="#local-6989586621679532422"><span class="hs-identifier hs-var">gs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-900"></span><span class="annot"><a href="Data.OldList.html#foldr7_left"><span class="hs-identifier hs-var">foldr7_left</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g -&gt; h -&gt; i
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621679532421"><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532421"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[b] -&gt; [c] -&gt; [d] -&gt; [e] -&gt; [f] -&gt; [g] -&gt; h
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[b]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[c]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[d]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[e]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[f]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">[g]
</span><span class="hs-identifier">_</span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">i
</span><a href="#local-6989586621679532421"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-901"></span><span>
</span><span id="line-902"></span><span class="hs-pragma">{-# RULES</span><span>
</span><span id="line-903"></span><span>
</span><span id="line-904"></span><span id="local-6989586621679532420"><span class="annot"><span class="hs-pragma">&quot;foldr4/left&quot;</span></span><span>   </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532419"><span class="annot"><a href="#local-6989586621679532419"><span class="hs-pragma hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679532418"><span class="annot"><a href="#local-6989586621679532418"><span class="hs-pragma hs-var">z</span></a></span></span><span> </span><span class="hs-pragma">(</span><span id="local-6989586621679532417"><span class="annot"><a href="#local-6989586621679532417"><span class="hs-pragma hs-var">g</span></a></span></span><span class="hs-pragma">::</span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532416"><span class="annot"><a href="#local-6989586621679532416"><span class="hs-pragma hs-type">b</span></a></span></span><span class="hs-pragma">.</span><span class="hs-pragma">(</span><span class="annot"><a href="#local-6989586621679532420"><span class="hs-pragma hs-type">a</span></a></span><span class="hs-pragma">-&gt;</span><span class="annot"><a href="#local-6989586621679532416"><span class="hs-pragma hs-type">b</span></a></span><span class="hs-pragma">-&gt;</span><span class="annot"><a href="#local-6989586621679532416"><span class="hs-pragma hs-type">b</span></a></span><span class="hs-pragma">)</span><span class="hs-pragma">-&gt;</span><span class="annot"><a href="#local-6989586621679532416"><span class="hs-pragma hs-type">b</span></a></span><span class="hs-pragma">-&gt;</span><span class="annot"><a href="#local-6989586621679532416"><span class="hs-pragma hs-type">b</span></a></span><span class="hs-pragma">)</span><span class="hs-pragma">.</span><span>
</span><span id="line-905"></span><span>                  </span><span class="annot"><a href="Data.OldList.html#foldr4"><span class="hs-pragma hs-type">foldr4</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532419"><span class="hs-pragma hs-type">k</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532418"><span class="hs-pragma hs-type">z</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="GHC.Base.html#build"><span class="hs-pragma hs-type">build</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532417"><span class="hs-pragma hs-type">g</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="#local-6989586621679532417"><span class="hs-pragma hs-type">g</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.OldList.html#foldr4_left"><span class="hs-pragma hs-type">foldr4_left</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532419"><span class="hs-pragma hs-type">k</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532418"><span class="hs-pragma hs-type">z</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">\</span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679532418"><span class="hs-pragma hs-type">z</span></a></span><span class="hs-pragma">)</span></span><span>
</span><span id="line-906"></span><span id="local-6989586621679532415"><span class="annot"><span class="hs-pragma">&quot;foldr5/left&quot;</span></span><span>   </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532414"><span class="annot"><a href="#local-6989586621679532414"><span class="hs-pragma hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679532413"><span class="annot"><a href="#local-6989586621679532413"><span class="hs-pragma hs-var">z</span></a></span></span><span> </span><span class="hs-pragma">(</span><span id="local-6989586621679532412"><span class="annot"><a href="#local-6989586621679532412"><span class="hs-pragma hs-var">g</span></a></span></span><span class="hs-pragma">::</span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532411"><span class="annot"><a href="#local-6989586621679532411"><span class="hs-pragma hs-type">b</span></a></span></span><span class="hs-pragma">.</span><span class="hs-pragma">(</span><span class="annot"><a href="#local-6989586621679532415"><span class="hs-pragma hs-type">a</span></a></span><span class="hs-pragma">-&gt;</span><span class="annot"><a href="#local-6989586621679532411"><span class="hs-pragma hs-type">b</span></a></span><span class="hs-pragma">-&gt;</span><span class="annot"><a href="#local-6989586621679532411"><span class="hs-pragma hs-type">b</span></a></span><span class="hs-pragma">)</span><span class="hs-pragma">-&gt;</span><span class="annot"><a href="#local-6989586621679532411"><span class="hs-pragma hs-type">b</span></a></span><span class="hs-pragma">-&gt;</span><span class="annot"><a href="#local-6989586621679532411"><span class="hs-pragma hs-type">b</span></a></span><span class="hs-pragma">)</span><span class="hs-pragma">.</span><span>
</span><span id="line-907"></span><span>                  </span><span class="annot"><a href="Data.OldList.html#foldr5"><span class="hs-pragma hs-type">foldr5</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532414"><span class="hs-pragma hs-type">k</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532413"><span class="hs-pragma hs-type">z</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="GHC.Base.html#build"><span class="hs-pragma hs-type">build</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532412"><span class="hs-pragma hs-type">g</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="#local-6989586621679532412"><span class="hs-pragma hs-type">g</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.OldList.html#foldr5_left"><span class="hs-pragma hs-type">foldr5_left</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532414"><span class="hs-pragma hs-type">k</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532413"><span class="hs-pragma hs-type">z</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">\</span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679532413"><span class="hs-pragma hs-type">z</span></a></span><span class="hs-pragma">)</span></span><span>
</span><span id="line-908"></span><span id="local-6989586621679532410"><span class="annot"><span class="hs-pragma">&quot;foldr6/left&quot;</span></span><span>   </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532409"><span class="annot"><a href="#local-6989586621679532409"><span class="hs-pragma hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679532408"><span class="annot"><a href="#local-6989586621679532408"><span class="hs-pragma hs-var">z</span></a></span></span><span> </span><span class="hs-pragma">(</span><span id="local-6989586621679532407"><span class="annot"><a href="#local-6989586621679532407"><span class="hs-pragma hs-var">g</span></a></span></span><span class="hs-pragma">::</span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532406"><span class="annot"><a href="#local-6989586621679532406"><span class="hs-pragma hs-type">b</span></a></span></span><span class="hs-pragma">.</span><span class="hs-pragma">(</span><span class="annot"><a href="#local-6989586621679532410"><span class="hs-pragma hs-type">a</span></a></span><span class="hs-pragma">-&gt;</span><span class="annot"><a href="#local-6989586621679532406"><span class="hs-pragma hs-type">b</span></a></span><span class="hs-pragma">-&gt;</span><span class="annot"><a href="#local-6989586621679532406"><span class="hs-pragma hs-type">b</span></a></span><span class="hs-pragma">)</span><span class="hs-pragma">-&gt;</span><span class="annot"><a href="#local-6989586621679532406"><span class="hs-pragma hs-type">b</span></a></span><span class="hs-pragma">-&gt;</span><span class="annot"><a href="#local-6989586621679532406"><span class="hs-pragma hs-type">b</span></a></span><span class="hs-pragma">)</span><span class="hs-pragma">.</span><span>
</span><span id="line-909"></span><span>                  </span><span class="annot"><a href="Data.OldList.html#foldr6"><span class="hs-pragma hs-type">foldr6</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532409"><span class="hs-pragma hs-type">k</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532408"><span class="hs-pragma hs-type">z</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="GHC.Base.html#build"><span class="hs-pragma hs-type">build</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532407"><span class="hs-pragma hs-type">g</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="#local-6989586621679532407"><span class="hs-pragma hs-type">g</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.OldList.html#foldr6_left"><span class="hs-pragma hs-type">foldr6_left</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532409"><span class="hs-pragma hs-type">k</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532408"><span class="hs-pragma hs-type">z</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">\</span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679532408"><span class="hs-pragma hs-type">z</span></a></span><span class="hs-pragma">)</span></span><span>
</span><span id="line-910"></span><span id="local-6989586621679532405"><span class="annot"><span class="hs-pragma">&quot;foldr7/left&quot;</span></span><span>   </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532404"><span class="annot"><a href="#local-6989586621679532404"><span class="hs-pragma hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679532403"><span class="annot"><a href="#local-6989586621679532403"><span class="hs-pragma hs-var">z</span></a></span></span><span> </span><span class="hs-pragma">(</span><span id="local-6989586621679532402"><span class="annot"><a href="#local-6989586621679532402"><span class="hs-pragma hs-var">g</span></a></span></span><span class="hs-pragma">::</span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532401"><span class="annot"><a href="#local-6989586621679532401"><span class="hs-pragma hs-type">b</span></a></span></span><span class="hs-pragma">.</span><span class="hs-pragma">(</span><span class="annot"><a href="#local-6989586621679532405"><span class="hs-pragma hs-type">a</span></a></span><span class="hs-pragma">-&gt;</span><span class="annot"><a href="#local-6989586621679532401"><span class="hs-pragma hs-type">b</span></a></span><span class="hs-pragma">-&gt;</span><span class="annot"><a href="#local-6989586621679532401"><span class="hs-pragma hs-type">b</span></a></span><span class="hs-pragma">)</span><span class="hs-pragma">-&gt;</span><span class="annot"><a href="#local-6989586621679532401"><span class="hs-pragma hs-type">b</span></a></span><span class="hs-pragma">-&gt;</span><span class="annot"><a href="#local-6989586621679532401"><span class="hs-pragma hs-type">b</span></a></span><span class="hs-pragma">)</span><span class="hs-pragma">.</span><span>
</span><span id="line-911"></span><span>                  </span><span class="annot"><a href="Data.OldList.html#foldr7"><span class="hs-pragma hs-type">foldr7</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532404"><span class="hs-pragma hs-type">k</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532403"><span class="hs-pragma hs-type">z</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="GHC.Base.html#build"><span class="hs-pragma hs-type">build</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532402"><span class="hs-pragma hs-type">g</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="#local-6989586621679532402"><span class="hs-pragma hs-type">g</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.OldList.html#foldr7_left"><span class="hs-pragma hs-type">foldr7_left</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532404"><span class="hs-pragma hs-type">k</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532403"><span class="hs-pragma hs-type">z</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">\</span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="annot"><span class="hs-pragma">_</span></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679532403"><span class="hs-pragma hs-type">z</span></a></span><span class="hs-pragma">)</span></span><span>
</span><span id="line-912"></span><span>
</span><span id="line-913"></span><span class="annot"><span class="hs-pragma">&quot;zipWith4&quot;</span></span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">~</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532400"><span class="annot"><a href="#local-6989586621679532400"><span class="hs-pragma hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679532399"><span class="annot"><a href="#local-6989586621679532399"><span class="hs-pragma hs-var">as</span></a></span></span><span> </span><span id="local-6989586621679532398"><span class="annot"><a href="#local-6989586621679532398"><span class="hs-pragma hs-var">bs</span></a></span></span><span> </span><span id="local-6989586621679532397"><span class="annot"><a href="#local-6989586621679532397"><span class="hs-pragma hs-var">cs</span></a></span></span><span> </span><span id="local-6989586621679532396"><span class="annot"><a href="#local-6989586621679532396"><span class="hs-pragma hs-var">ds</span></a></span></span><span class="hs-pragma">.</span><span>
</span><span id="line-914"></span><span>                  </span><span class="annot"><a href="Data.OldList.html#zipWith4"><span class="hs-pragma hs-type">zipWith4</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532400"><span class="hs-pragma hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532399"><span class="hs-pragma hs-type">as</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532398"><span class="hs-pragma hs-type">bs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532397"><span class="hs-pragma hs-type">cs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532396"><span class="hs-pragma hs-type">ds</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Base.html#build"><span class="hs-pragma hs-type">build</span></a></span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">\</span><span id="local-6989586621679532395"><span class="annot"><a href="#local-6989586621679532395"><span class="hs-pragma hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679532394"><span class="annot"><a href="#local-6989586621679532394"><span class="hs-pragma hs-var">n</span></a></span></span><span> </span><span class="hs-pragma">-&gt;</span><span>
</span><span id="line-915"></span><span>                        </span><span class="annot"><a href="Data.OldList.html#foldr4"><span class="hs-pragma hs-type">foldr4</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.OldList.html#zipWith4FB"><span class="hs-pragma hs-type">zipWith4FB</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532395"><span class="hs-pragma hs-type">c</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532400"><span class="hs-pragma hs-type">f</span></a></span><span class="hs-pragma">)</span><span> </span><span class="annot"><a href="#local-6989586621679532394"><span class="hs-pragma hs-type">n</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532399"><span class="hs-pragma hs-type">as</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532398"><span class="hs-pragma hs-type">bs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532397"><span class="hs-pragma hs-type">cs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532396"><span class="hs-pragma hs-type">ds</span></a></span><span class="hs-pragma">)</span><span>
</span><span id="line-916"></span><span class="annot"><span class="hs-pragma">&quot;zipWith5&quot;</span></span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">~</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532393"><span class="annot"><a href="#local-6989586621679532393"><span class="hs-pragma hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679532392"><span class="annot"><a href="#local-6989586621679532392"><span class="hs-pragma hs-var">as</span></a></span></span><span> </span><span id="local-6989586621679532391"><span class="annot"><a href="#local-6989586621679532391"><span class="hs-pragma hs-var">bs</span></a></span></span><span> </span><span id="local-6989586621679532390"><span class="annot"><a href="#local-6989586621679532390"><span class="hs-pragma hs-var">cs</span></a></span></span><span> </span><span id="local-6989586621679532389"><span class="annot"><a href="#local-6989586621679532389"><span class="hs-pragma hs-var">ds</span></a></span></span><span> </span><span id="local-6989586621679532388"><span class="annot"><a href="#local-6989586621679532388"><span class="hs-pragma hs-var">es</span></a></span></span><span class="hs-pragma">.</span><span>
</span><span id="line-917"></span><span>                  </span><span class="annot"><a href="Data.OldList.html#zipWith5"><span class="hs-pragma hs-type">zipWith5</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532393"><span class="hs-pragma hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532392"><span class="hs-pragma hs-type">as</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532391"><span class="hs-pragma hs-type">bs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532390"><span class="hs-pragma hs-type">cs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532389"><span class="hs-pragma hs-type">ds</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532388"><span class="hs-pragma hs-type">es</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Base.html#build"><span class="hs-pragma hs-type">build</span></a></span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">\</span><span id="local-6989586621679532387"><span class="annot"><a href="#local-6989586621679532387"><span class="hs-pragma hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679532386"><span class="annot"><a href="#local-6989586621679532386"><span class="hs-pragma hs-var">n</span></a></span></span><span> </span><span class="hs-pragma">-&gt;</span><span>
</span><span id="line-918"></span><span>                        </span><span class="annot"><a href="Data.OldList.html#foldr5"><span class="hs-pragma hs-type">foldr5</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.OldList.html#zipWith5FB"><span class="hs-pragma hs-type">zipWith5FB</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532387"><span class="hs-pragma hs-type">c</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532393"><span class="hs-pragma hs-type">f</span></a></span><span class="hs-pragma">)</span><span> </span><span class="annot"><a href="#local-6989586621679532386"><span class="hs-pragma hs-type">n</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532392"><span class="hs-pragma hs-type">as</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532391"><span class="hs-pragma hs-type">bs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532390"><span class="hs-pragma hs-type">cs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532389"><span class="hs-pragma hs-type">ds</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532388"><span class="hs-pragma hs-type">es</span></a></span><span class="hs-pragma">)</span><span>
</span><span id="line-919"></span><span class="annot"><span class="hs-pragma">&quot;zipWith6&quot;</span></span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">~</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532385"><span class="annot"><a href="#local-6989586621679532385"><span class="hs-pragma hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679532384"><span class="annot"><a href="#local-6989586621679532384"><span class="hs-pragma hs-var">as</span></a></span></span><span> </span><span id="local-6989586621679532383"><span class="annot"><a href="#local-6989586621679532383"><span class="hs-pragma hs-var">bs</span></a></span></span><span> </span><span id="local-6989586621679532382"><span class="annot"><a href="#local-6989586621679532382"><span class="hs-pragma hs-var">cs</span></a></span></span><span> </span><span id="local-6989586621679532381"><span class="annot"><a href="#local-6989586621679532381"><span class="hs-pragma hs-var">ds</span></a></span></span><span> </span><span id="local-6989586621679532380"><span class="annot"><a href="#local-6989586621679532380"><span class="hs-pragma hs-var">es</span></a></span></span><span> </span><span id="local-6989586621679532379"><span class="annot"><a href="#local-6989586621679532379"><span class="hs-pragma hs-var">fs</span></a></span></span><span class="hs-pragma">.</span><span>
</span><span id="line-920"></span><span>                  </span><span class="annot"><a href="Data.OldList.html#zipWith6"><span class="hs-pragma hs-type">zipWith6</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532385"><span class="hs-pragma hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532384"><span class="hs-pragma hs-type">as</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532383"><span class="hs-pragma hs-type">bs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532382"><span class="hs-pragma hs-type">cs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532381"><span class="hs-pragma hs-type">ds</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532380"><span class="hs-pragma hs-type">es</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532379"><span class="hs-pragma hs-type">fs</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Base.html#build"><span class="hs-pragma hs-type">build</span></a></span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">\</span><span id="local-6989586621679532378"><span class="annot"><a href="#local-6989586621679532378"><span class="hs-pragma hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679532377"><span class="annot"><a href="#local-6989586621679532377"><span class="hs-pragma hs-var">n</span></a></span></span><span> </span><span class="hs-pragma">-&gt;</span><span>
</span><span id="line-921"></span><span>                        </span><span class="annot"><a href="Data.OldList.html#foldr6"><span class="hs-pragma hs-type">foldr6</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.OldList.html#zipWith6FB"><span class="hs-pragma hs-type">zipWith6FB</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532378"><span class="hs-pragma hs-type">c</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532385"><span class="hs-pragma hs-type">f</span></a></span><span class="hs-pragma">)</span><span> </span><span class="annot"><a href="#local-6989586621679532377"><span class="hs-pragma hs-type">n</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532384"><span class="hs-pragma hs-type">as</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532383"><span class="hs-pragma hs-type">bs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532382"><span class="hs-pragma hs-type">cs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532381"><span class="hs-pragma hs-type">ds</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532380"><span class="hs-pragma hs-type">es</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532379"><span class="hs-pragma hs-type">fs</span></a></span><span class="hs-pragma">)</span><span>
</span><span id="line-922"></span><span class="annot"><span class="hs-pragma">&quot;zipWith7&quot;</span></span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">~</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532376"><span class="annot"><a href="#local-6989586621679532376"><span class="hs-pragma hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679532375"><span class="annot"><a href="#local-6989586621679532375"><span class="hs-pragma hs-var">as</span></a></span></span><span> </span><span id="local-6989586621679532374"><span class="annot"><a href="#local-6989586621679532374"><span class="hs-pragma hs-var">bs</span></a></span></span><span> </span><span id="local-6989586621679532373"><span class="annot"><a href="#local-6989586621679532373"><span class="hs-pragma hs-var">cs</span></a></span></span><span> </span><span id="local-6989586621679532372"><span class="annot"><a href="#local-6989586621679532372"><span class="hs-pragma hs-var">ds</span></a></span></span><span> </span><span id="local-6989586621679532371"><span class="annot"><a href="#local-6989586621679532371"><span class="hs-pragma hs-var">es</span></a></span></span><span> </span><span id="local-6989586621679532370"><span class="annot"><a href="#local-6989586621679532370"><span class="hs-pragma hs-var">fs</span></a></span></span><span> </span><span id="local-6989586621679532369"><span class="annot"><a href="#local-6989586621679532369"><span class="hs-pragma hs-var">gs</span></a></span></span><span class="hs-pragma">.</span><span>
</span><span id="line-923"></span><span>                  </span><span class="annot"><a href="Data.OldList.html#zipWith7"><span class="hs-pragma hs-type">zipWith7</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532376"><span class="hs-pragma hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532375"><span class="hs-pragma hs-type">as</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532374"><span class="hs-pragma hs-type">bs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532373"><span class="hs-pragma hs-type">cs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532372"><span class="hs-pragma hs-type">ds</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532371"><span class="hs-pragma hs-type">es</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532370"><span class="hs-pragma hs-type">fs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532369"><span class="hs-pragma hs-type">gs</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Base.html#build"><span class="hs-pragma hs-type">build</span></a></span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">\</span><span id="local-6989586621679532368"><span class="annot"><a href="#local-6989586621679532368"><span class="hs-pragma hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679532367"><span class="annot"><a href="#local-6989586621679532367"><span class="hs-pragma hs-var">n</span></a></span></span><span> </span><span class="hs-pragma">-&gt;</span><span>
</span><span id="line-924"></span><span>                        </span><span class="annot"><a href="Data.OldList.html#foldr7"><span class="hs-pragma hs-type">foldr7</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.OldList.html#zipWith7FB"><span class="hs-pragma hs-type">zipWith7FB</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532368"><span class="hs-pragma hs-type">c</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532376"><span class="hs-pragma hs-type">f</span></a></span><span class="hs-pragma">)</span><span> </span><span class="annot"><a href="#local-6989586621679532367"><span class="hs-pragma hs-type">n</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532375"><span class="hs-pragma hs-type">as</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532374"><span class="hs-pragma hs-type">bs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532373"><span class="hs-pragma hs-type">cs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532372"><span class="hs-pragma hs-type">ds</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532371"><span class="hs-pragma hs-type">es</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532370"><span class="hs-pragma hs-type">fs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532369"><span class="hs-pragma hs-type">gs</span></a></span><span class="hs-pragma">)</span><span>
</span><span id="line-925"></span><span>
</span><span id="line-926"></span><span class="annot"><span class="hs-pragma">&quot;zipWith4List&quot;</span></span><span>  </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span>  </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532366"><span class="annot"><a href="#local-6989586621679532366"><span class="hs-pragma hs-var">f</span></a></span></span><span class="hs-pragma">.</span><span>   </span><span class="annot"><a href="Data.OldList.html#foldr4"><span class="hs-pragma hs-type">foldr4</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.OldList.html#zipWith4FB"><span class="hs-pragma hs-type">zipWith4FB</span></a></span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">:</span><span class="hs-pragma">)</span><span> </span><span class="annot"><a href="#local-6989586621679532366"><span class="hs-pragma hs-type">f</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">]</span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="Data.OldList.html#zipWith4"><span class="hs-pragma hs-type">zipWith4</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532366"><span class="hs-pragma hs-type">f</span></a></span><span>
</span><span id="line-927"></span><span class="annot"><span class="hs-pragma">&quot;zipWith5List&quot;</span></span><span>  </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span>  </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532365"><span class="annot"><a href="#local-6989586621679532365"><span class="hs-pragma hs-var">f</span></a></span></span><span class="hs-pragma">.</span><span>   </span><span class="annot"><a href="Data.OldList.html#foldr5"><span class="hs-pragma hs-type">foldr5</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.OldList.html#zipWith5FB"><span class="hs-pragma hs-type">zipWith5FB</span></a></span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">:</span><span class="hs-pragma">)</span><span> </span><span class="annot"><a href="#local-6989586621679532365"><span class="hs-pragma hs-type">f</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">]</span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="Data.OldList.html#zipWith5"><span class="hs-pragma hs-type">zipWith5</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532365"><span class="hs-pragma hs-type">f</span></a></span><span>
</span><span id="line-928"></span><span class="annot"><span class="hs-pragma">&quot;zipWith6List&quot;</span></span><span>  </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span>  </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532364"><span class="annot"><a href="#local-6989586621679532364"><span class="hs-pragma hs-var">f</span></a></span></span><span class="hs-pragma">.</span><span>   </span><span class="annot"><a href="Data.OldList.html#foldr6"><span class="hs-pragma hs-type">foldr6</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.OldList.html#zipWith6FB"><span class="hs-pragma hs-type">zipWith6FB</span></a></span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">:</span><span class="hs-pragma">)</span><span> </span><span class="annot"><a href="#local-6989586621679532364"><span class="hs-pragma hs-type">f</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">]</span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="Data.OldList.html#zipWith6"><span class="hs-pragma hs-type">zipWith6</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532364"><span class="hs-pragma hs-type">f</span></a></span><span>
</span><span id="line-929"></span><span class="annot"><span class="hs-pragma">&quot;zipWith7List&quot;</span></span><span>  </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span>  </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532363"><span class="annot"><a href="#local-6989586621679532363"><span class="hs-pragma hs-var">f</span></a></span></span><span class="hs-pragma">.</span><span>   </span><span class="annot"><a href="Data.OldList.html#foldr7"><span class="hs-pragma hs-type">foldr7</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.OldList.html#zipWith7FB"><span class="hs-pragma hs-type">zipWith7FB</span></a></span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">:</span><span class="hs-pragma">)</span><span> </span><span class="annot"><a href="#local-6989586621679532363"><span class="hs-pragma hs-type">f</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">]</span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="Data.OldList.html#zipWith7"><span class="hs-pragma hs-type">zipWith7</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532363"><span class="hs-pragma hs-type">f</span></a></span><span>
</span><span id="line-930"></span><span>
</span><span id="line-931"></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-932"></span><span>
</span><span id="line-933"></span><span class="hs-comment">{-

Note [Inline @unzipN@ functions]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The inline principle for @unzip{4,5,6,7}@ is the same as 'unzip'/'unzip3' in
&quot;GHC.List&quot;.
The 'unzip'/'unzip3' functions are inlined so that the `foldr` with which they
are defined has an opportunity to fuse.

As such, since there are not any differences between 2/3-ary 'unzip' and its
n-ary counterparts below aside from the number of arguments, the `INLINE`
pragma should be replicated in the @unzipN@ functions below as well.

-}</span><span>
</span><span id="line-948"></span><span>
</span><span id="line-949"></span><span class="hs-comment">-- | The 'unzip4' function takes a list of quadruples and returns four</span><span>
</span><span id="line-950"></span><span class="hs-comment">-- lists, analogous to 'unzip'.</span><span>
</span><span id="line-951"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.OldList.html#unzip4"><span class="hs-pragma hs-type">unzip4</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-952"></span><span class="hs-comment">-- Inline so that fusion with `foldr` has an opportunity to fire.</span><span>
</span><span id="line-953"></span><span class="hs-comment">-- See Note [Inline @unzipN@ functions] above.</span><span>
</span><span id="line-954"></span><span id="local-6989586621679533112"><span id="local-6989586621679533113"><span id="local-6989586621679533114"><span id="local-6989586621679533115"><span class="annot"><a href="Data.OldList.html#unzip4"><span class="hs-identifier hs-type">unzip4</span></a></span><span>                  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533115"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533114"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533113"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533112"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533115"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533114"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533113"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533112"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span></span></span></span><span>
</span><span id="line-955"></span><span id="unzip4"><span class="annot"><span class="annottext">unzip4 :: forall a b c d. [(a, b, c, d)] -&gt; ([a], [b], [c], [d])
</span><a href="Data.OldList.html#unzip4"><span class="hs-identifier hs-var hs-var">unzip4</span></a></span></span><span>                  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">((a, b, c, d) -&gt; ([a], [b], [c], [d]) -&gt; ([a], [b], [c], [d]))
-&gt; ([a], [b], [c], [d]) -&gt; [(a, b, c, d)] -&gt; ([a], [b], [c], [d])
forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; [a] -&gt; b
</span><a href="GHC.Base.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679532362"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532362"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532361"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532361"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532360"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532360"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532359"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532359"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679532358"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532358"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532357"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532357"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532356"><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532356"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532355"><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532355"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-956"></span><span>                                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532362"><span class="hs-identifier hs-var">a</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532358"><span class="hs-keyword hs-var">as</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532361"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">b -&gt; [b] -&gt; [b]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532357"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532360"><span class="hs-identifier hs-var">c</span></a></span><span class="annot"><span class="annottext">c -&gt; [c] -&gt; [c]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532356"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532359"><span class="hs-identifier hs-var">d</span></a></span><span class="annot"><span class="annottext">d -&gt; [d] -&gt; [d]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532355"><span class="hs-identifier hs-var">ds</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-957"></span><span>                                 </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-958"></span><span>
</span><span id="line-959"></span><span class="hs-comment">-- | The 'unzip5' function takes a list of five-tuples and returns five</span><span>
</span><span id="line-960"></span><span class="hs-comment">-- lists, analogous to 'unzip'.</span><span>
</span><span id="line-961"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.OldList.html#unzip5"><span class="hs-pragma hs-type">unzip5</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-962"></span><span class="hs-comment">-- Inline so that fusion with `foldr` has an opportunity to fire.</span><span>
</span><span id="line-963"></span><span class="hs-comment">-- See Note [Inline @unzipN@ functions] above.</span><span>
</span><span id="line-964"></span><span id="local-6989586621679533103"><span id="local-6989586621679533104"><span id="local-6989586621679533105"><span id="local-6989586621679533106"><span id="local-6989586621679533107"><span class="annot"><a href="Data.OldList.html#unzip5"><span class="hs-identifier hs-type">unzip5</span></a></span><span>                  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533107"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533106"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533105"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533104"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533103"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533107"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533106"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533105"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533104"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533103"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span></span></span></span></span><span>
</span><span id="line-965"></span><span id="unzip5"><span class="annot"><span class="annottext">unzip5 :: forall a b c d e. [(a, b, c, d, e)] -&gt; ([a], [b], [c], [d], [e])
</span><a href="Data.OldList.html#unzip5"><span class="hs-identifier hs-var hs-var">unzip5</span></a></span></span><span>                  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">((a, b, c, d, e)
 -&gt; ([a], [b], [c], [d], [e]) -&gt; ([a], [b], [c], [d], [e]))
-&gt; ([a], [b], [c], [d], [e])
-&gt; [(a, b, c, d, e)]
-&gt; ([a], [b], [c], [d], [e])
forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; [a] -&gt; b
</span><a href="GHC.Base.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679532354"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532354"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532353"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532353"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532352"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532352"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532351"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532351"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532350"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532350"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679532349"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532349"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532348"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532348"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532347"><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532347"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532346"><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532346"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532345"><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532345"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-966"></span><span>                                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532354"><span class="hs-identifier hs-var">a</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532349"><span class="hs-keyword hs-var">as</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532353"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">b -&gt; [b] -&gt; [b]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532348"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532352"><span class="hs-identifier hs-var">c</span></a></span><span class="annot"><span class="annottext">c -&gt; [c] -&gt; [c]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532347"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532351"><span class="hs-identifier hs-var">d</span></a></span><span class="annot"><span class="annottext">d -&gt; [d] -&gt; [d]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532346"><span class="hs-identifier hs-var">ds</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532350"><span class="hs-identifier hs-var">e</span></a></span><span class="annot"><span class="annottext">e -&gt; [e] -&gt; [e]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532345"><span class="hs-identifier hs-var">es</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-967"></span><span>                                 </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-968"></span><span>
</span><span id="line-969"></span><span class="hs-comment">-- | The 'unzip6' function takes a list of six-tuples and returns six</span><span>
</span><span id="line-970"></span><span class="hs-comment">-- lists, analogous to 'unzip'.</span><span>
</span><span id="line-971"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.OldList.html#unzip6"><span class="hs-pragma hs-type">unzip6</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-972"></span><span class="hs-comment">-- Inline so that fusion with `foldr` has an opportunity to fire.</span><span>
</span><span id="line-973"></span><span class="hs-comment">-- See Note [Inline @unzipN@ functions] above.</span><span>
</span><span id="line-974"></span><span id="local-6989586621679533092"><span id="local-6989586621679533093"><span id="local-6989586621679533094"><span id="local-6989586621679533095"><span id="local-6989586621679533096"><span id="local-6989586621679533097"><span class="annot"><a href="Data.OldList.html#unzip6"><span class="hs-identifier hs-type">unzip6</span></a></span><span>                  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533097"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533096"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533095"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533094"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533093"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533092"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533097"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533096"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533095"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533094"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533093"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533092"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span></span></span></span></span></span><span>
</span><span id="line-975"></span><span id="unzip6"><span class="annot"><span class="annottext">unzip6 :: forall a b c d e f.
[(a, b, c, d, e, f)] -&gt; ([a], [b], [c], [d], [e], [f])
</span><a href="Data.OldList.html#unzip6"><span class="hs-identifier hs-var hs-var">unzip6</span></a></span></span><span>                  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">((a, b, c, d, e, f)
 -&gt; ([a], [b], [c], [d], [e], [f])
 -&gt; ([a], [b], [c], [d], [e], [f]))
-&gt; ([a], [b], [c], [d], [e], [f])
-&gt; [(a, b, c, d, e, f)]
-&gt; ([a], [b], [c], [d], [e], [f])
forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; [a] -&gt; b
</span><a href="GHC.Base.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679532344"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532344"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532343"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532343"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532342"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532342"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532341"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532341"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532340"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532340"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532339"><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532339"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679532338"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532338"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532337"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532337"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532336"><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532336"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532335"><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532335"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532334"><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532334"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532333"><span class="annot"><span class="annottext">[f]
</span><a href="#local-6989586621679532333"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-976"></span><span>                                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532344"><span class="hs-identifier hs-var">a</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532338"><span class="hs-keyword hs-var">as</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532343"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">b -&gt; [b] -&gt; [b]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532337"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532342"><span class="hs-identifier hs-var">c</span></a></span><span class="annot"><span class="annottext">c -&gt; [c] -&gt; [c]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532336"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532341"><span class="hs-identifier hs-var">d</span></a></span><span class="annot"><span class="annottext">d -&gt; [d] -&gt; [d]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532335"><span class="hs-identifier hs-var">ds</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532340"><span class="hs-identifier hs-var">e</span></a></span><span class="annot"><span class="annottext">e -&gt; [e] -&gt; [e]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532334"><span class="hs-identifier hs-var">es</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532339"><span class="hs-identifier hs-var">f</span></a></span><span class="annot"><span class="annottext">f -&gt; [f] -&gt; [f]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[f]
</span><a href="#local-6989586621679532333"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-977"></span><span>                                 </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-978"></span><span>
</span><span id="line-979"></span><span class="hs-comment">-- | The 'unzip7' function takes a list of seven-tuples and returns</span><span>
</span><span id="line-980"></span><span class="hs-comment">-- seven lists, analogous to 'unzip'.</span><span>
</span><span id="line-981"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.OldList.html#unzip7"><span class="hs-pragma hs-type">unzip7</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-982"></span><span class="hs-comment">-- Inline so that fusion with `foldr` has an opportunity to fire.</span><span>
</span><span id="line-983"></span><span class="hs-comment">-- See Note [Inline @unzipN@ functions] above.</span><span>
</span><span id="line-984"></span><span id="local-6989586621679533079"><span id="local-6989586621679533080"><span id="local-6989586621679533081"><span id="local-6989586621679533082"><span id="local-6989586621679533083"><span id="local-6989586621679533084"><span id="local-6989586621679533085"><span class="annot"><a href="Data.OldList.html#unzip7"><span class="hs-identifier hs-type">unzip7</span></a></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533085"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533084"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533083"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533082"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533081"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533080"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679533079"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533085"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533084"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533083"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533082"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533081"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533080"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533079"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span></span></span></span></span></span></span><span>
</span><span id="line-985"></span><span id="unzip7"><span class="annot"><span class="annottext">unzip7 :: forall a b c d e f g.
[(a, b, c, d, e, f, g)] -&gt; ([a], [b], [c], [d], [e], [f], [g])
</span><a href="Data.OldList.html#unzip7"><span class="hs-identifier hs-var hs-var">unzip7</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">((a, b, c, d, e, f, g)
 -&gt; ([a], [b], [c], [d], [e], [f], [g])
 -&gt; ([a], [b], [c], [d], [e], [f], [g]))
-&gt; ([a], [b], [c], [d], [e], [f], [g])
-&gt; [(a, b, c, d, e, f, g)]
-&gt; ([a], [b], [c], [d], [e], [f], [g])
forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; [a] -&gt; b
</span><a href="GHC.Base.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679532332"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532332"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532331"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532331"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532330"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532330"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532329"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532329"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532328"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532328"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532327"><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532327"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532326"><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679532326"><span class="hs-identifier hs-var">g</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679532325"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532325"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532324"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532324"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532323"><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532323"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532322"><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532322"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532321"><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532321"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532320"><span class="annot"><span class="annottext">[f]
</span><a href="#local-6989586621679532320"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532319"><span class="annot"><span class="annottext">[g]
</span><a href="#local-6989586621679532319"><span class="hs-identifier hs-var">gs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-986"></span><span>                                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532332"><span class="hs-identifier hs-var">a</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532325"><span class="hs-keyword hs-var">as</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532331"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">b -&gt; [b] -&gt; [b]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679532324"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679532330"><span class="hs-identifier hs-var">c</span></a></span><span class="annot"><span class="annottext">c -&gt; [c] -&gt; [c]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[c]
</span><a href="#local-6989586621679532323"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679532329"><span class="hs-identifier hs-var">d</span></a></span><span class="annot"><span class="annottext">d -&gt; [d] -&gt; [d]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[d]
</span><a href="#local-6989586621679532322"><span class="hs-identifier hs-var">ds</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679532328"><span class="hs-identifier hs-var">e</span></a></span><span class="annot"><span class="annottext">e -&gt; [e] -&gt; [e]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[e]
</span><a href="#local-6989586621679532321"><span class="hs-identifier hs-var">es</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">f
</span><a href="#local-6989586621679532327"><span class="hs-identifier hs-var">f</span></a></span><span class="annot"><span class="annottext">f -&gt; [f] -&gt; [f]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[f]
</span><a href="#local-6989586621679532320"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679532326"><span class="hs-identifier hs-var">g</span></a></span><span class="annot"><span class="annottext">g -&gt; [g] -&gt; [g]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[g]
</span><a href="#local-6989586621679532319"><span class="hs-identifier hs-var">gs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-987"></span><span>                         </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-988"></span><span>
</span><span id="line-989"></span><span>
</span><span id="line-990"></span><span class="hs-comment">-- | The 'deleteFirstsBy' function takes a predicate and two lists and</span><span>
</span><span id="line-991"></span><span class="hs-comment">-- returns the first list with the first occurrence of each element of</span><span>
</span><span id="line-992"></span><span class="hs-comment">-- the second list removed.</span><span>
</span><span id="line-993"></span><span id="local-6989586621679532318"><span class="annot"><a href="Data.OldList.html#deleteFirstsBy"><span class="hs-identifier hs-type">deleteFirstsBy</span></a></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679532318"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679532318"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532318"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532318"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532318"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-994"></span><span id="deleteFirstsBy"><span class="annot"><span class="annottext">deleteFirstsBy :: forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#deleteFirstsBy"><span class="hs-identifier hs-var hs-var">deleteFirstsBy</span></a></span></span><span> </span><span id="local-6989586621679532317"><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532317"><span class="hs-identifier hs-var">eq</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">([a] -&gt; a -&gt; [a]) -&gt; [a] -&gt; [a] -&gt; [a]
forall a b. (b -&gt; a -&gt; b) -&gt; b -&gt; [a] -&gt; b
</span><a href="GHC.List.html#foldl"><span class="hs-identifier hs-var">foldl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; [a] -&gt; [a]) -&gt; [a] -&gt; a -&gt; [a]
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Bool) -&gt; a -&gt; [a] -&gt; [a]
forall a. (a -&gt; a -&gt; Bool) -&gt; a -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#deleteBy"><span class="hs-identifier hs-var">deleteBy</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532317"><span class="hs-identifier hs-var">eq</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-995"></span><span>
</span><span id="line-996"></span><span class="hs-comment">-- | The 'group' function takes a list and returns a list of lists such</span><span>
</span><span id="line-997"></span><span class="hs-comment">-- that the concatenation of the result is equal to the argument.  Moreover,</span><span>
</span><span id="line-998"></span><span class="hs-comment">-- each sublist in the result contains only equal elements.  For example,</span><span>
</span><span id="line-999"></span><span class="hs-comment">--</span><span>
</span><span id="line-1000"></span><span class="hs-comment">-- &gt;&gt;&gt; group &quot;Mississippi&quot;</span><span>
</span><span id="line-1001"></span><span class="hs-comment">-- [&quot;M&quot;,&quot;i&quot;,&quot;ss&quot;,&quot;i&quot;,&quot;ss&quot;,&quot;i&quot;,&quot;pp&quot;,&quot;i&quot;]</span><span>
</span><span id="line-1002"></span><span class="hs-comment">--</span><span>
</span><span id="line-1003"></span><span class="hs-comment">-- It is a special case of 'groupBy', which allows the programmer to supply</span><span>
</span><span id="line-1004"></span><span class="hs-comment">-- their own equality test.</span><span>
</span><span id="line-1005"></span><span id="local-6989586621679533070"><span class="annot"><a href="Data.OldList.html#group"><span class="hs-identifier hs-type">group</span></a></span><span>                   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533070"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533070"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533070"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span></span><span>
</span><span id="line-1006"></span><span id="group"><span class="annot"><span class="annottext">group :: forall a. Eq a =&gt; [a] -&gt; [[a]]
</span><a href="Data.OldList.html#group"><span class="hs-identifier hs-var hs-var">group</span></a></span></span><span>                   </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [[a]]
forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [[a]]
</span><a href="Data.OldList.html#groupBy"><span class="hs-identifier hs-var">groupBy</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">(==)</span></a></span><span>
</span><span id="line-1007"></span><span>
</span><span id="line-1008"></span><span class="hs-comment">-- | The 'groupBy' function is the non-overloaded version of 'group'.</span><span>
</span><span id="line-1009"></span><span id="local-6989586621679533068"><span class="annot"><a href="Data.OldList.html#groupBy"><span class="hs-identifier hs-type">groupBy</span></a></span><span>                 </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533068"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533068"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533068"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533068"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span></span><span>
</span><span id="line-1010"></span><span id="groupBy"><span class="annot"><span class="annottext">groupBy :: forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [[a]]
</span><a href="Data.OldList.html#groupBy"><span class="hs-identifier hs-var hs-var">groupBy</span></a></span></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span>           </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1011"></span><span class="annot"><a href="Data.OldList.html#groupBy"><span class="hs-identifier hs-var">groupBy</span></a></span><span> </span><span id="local-6989586621679532314"><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532314"><span class="hs-identifier hs-var">eq</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532313"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532313"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532312"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532312"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532313"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532311"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]] -&gt; [[a]]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [[a]]
forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [[a]]
</span><a href="Data.OldList.html#groupBy"><span class="hs-identifier hs-var">groupBy</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532314"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532310"><span class="hs-identifier hs-var">zs</span></a></span><span>
</span><span id="line-1012"></span><span>                           </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532311"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532311"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532310"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532310"><span class="hs-identifier hs-var">zs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="GHC.List.html#span"><span class="hs-identifier hs-var">span</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679532314"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532313"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532312"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-1013"></span><span>
</span><span id="line-1014"></span><span class="hs-comment">-- | The 'inits' function returns all initial segments of the argument,</span><span>
</span><span id="line-1015"></span><span class="hs-comment">-- shortest first.  For example,</span><span>
</span><span id="line-1016"></span><span class="hs-comment">--</span><span>
</span><span id="line-1017"></span><span class="hs-comment">-- &gt;&gt;&gt; inits &quot;abc&quot;</span><span>
</span><span id="line-1018"></span><span class="hs-comment">-- [&quot;&quot;,&quot;a&quot;,&quot;ab&quot;,&quot;abc&quot;]</span><span>
</span><span id="line-1019"></span><span class="hs-comment">--</span><span>
</span><span id="line-1020"></span><span class="hs-comment">-- Note that 'inits' has the following strictness property:</span><span>
</span><span id="line-1021"></span><span class="hs-comment">-- @inits (xs ++ _|_) = inits xs ++ _|_@</span><span>
</span><span id="line-1022"></span><span class="hs-comment">--</span><span>
</span><span id="line-1023"></span><span class="hs-comment">-- In particular,</span><span>
</span><span id="line-1024"></span><span class="hs-comment">-- @inits _|_ = [] : _|_@</span><span>
</span><span id="line-1025"></span><span id="local-6989586621679532309"><span class="annot"><a href="Data.OldList.html#inits"><span class="hs-identifier hs-type">inits</span></a></span><span>                   </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532309"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532309"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span></span><span>
</span><span id="line-1026"></span><span id="inits"><span class="annot"><span class="annottext">inits :: forall a. [a] -&gt; [[a]]
</span><a href="Data.OldList.html#inits"><span class="hs-identifier hs-var hs-var">inits</span></a></span></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SnocBuilder a -&gt; [a]) -&gt; [SnocBuilder a] -&gt; [[a]]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">SnocBuilder a -&gt; [a]
forall a. SnocBuilder a -&gt; [a]
</span><a href="Data.OldList.html#toListSB"><span class="hs-identifier hs-var">toListSB</span></a></span><span> </span><span class="annot"><span class="annottext">([SnocBuilder a] -&gt; [[a]])
-&gt; ([a] -&gt; [SnocBuilder a]) -&gt; [a] -&gt; [[a]]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(SnocBuilder a -&gt; a -&gt; SnocBuilder a)
-&gt; SnocBuilder a -&gt; [a] -&gt; [SnocBuilder a]
forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; [a] -&gt; [b]
</span><a href="GHC.List.html#scanl%27"><span class="hs-identifier hs-var">scanl'</span></a></span><span> </span><span class="annot"><span class="annottext">SnocBuilder a -&gt; a -&gt; SnocBuilder a
forall a. SnocBuilder a -&gt; a -&gt; SnocBuilder a
</span><a href="Data.OldList.html#snocSB"><span class="hs-identifier hs-var">snocSB</span></a></span><span> </span><span class="annot"><span class="annottext">SnocBuilder a
forall a. SnocBuilder a
</span><a href="Data.OldList.html#emptySB"><span class="hs-identifier hs-var">emptySB</span></a></span><span>
</span><span id="line-1027"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="annot"><a href="Data.OldList.html#inits"><span class="hs-pragma hs-type">inits</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-1028"></span><span>
</span><span id="line-1029"></span><span class="hs-comment">-- We do not allow inits to inline, because it plays havoc with Call Arity</span><span>
</span><span id="line-1030"></span><span class="hs-comment">-- if it fuses with a consumer, and it would generally lead to serious</span><span>
</span><span id="line-1031"></span><span class="hs-comment">-- loss of sharing if allowed to fuse with a producer.</span><span>
</span><span id="line-1032"></span><span>
</span><span id="line-1033"></span><span class="hs-comment">-- | \(\mathcal{O}(n)\). The 'tails' function returns all final segments of the</span><span>
</span><span id="line-1034"></span><span class="hs-comment">-- argument, longest first. For example,</span><span>
</span><span id="line-1035"></span><span class="hs-comment">--</span><span>
</span><span id="line-1036"></span><span class="hs-comment">-- &gt;&gt;&gt; tails &quot;abc&quot;</span><span>
</span><span id="line-1037"></span><span class="hs-comment">-- [&quot;abc&quot;,&quot;bc&quot;,&quot;c&quot;,&quot;&quot;]</span><span>
</span><span id="line-1038"></span><span class="hs-comment">--</span><span>
</span><span id="line-1039"></span><span class="hs-comment">-- Note that 'tails' has the following strictness property:</span><span>
</span><span id="line-1040"></span><span class="hs-comment">-- @tails _|_ = _|_ : _|_@</span><span>
</span><span id="line-1041"></span><span id="local-6989586621679533494"><span class="annot"><a href="Data.OldList.html#tails"><span class="hs-identifier hs-type">tails</span></a></span><span>                   </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533494"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533494"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span></span><span>
</span><span id="line-1042"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Data.OldList.html#tails"><span class="hs-pragma hs-type">tails</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-1043"></span><span id="tails"><span class="annot"><span class="annottext">tails :: forall a. [a] -&gt; [[a]]
</span><a href="Data.OldList.html#tails"><span class="hs-identifier hs-var hs-var">tails</span></a></span></span><span> </span><span id="local-6989586621679532305"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532305"><span class="hs-identifier hs-var">lst</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">(forall b. ([a] -&gt; b -&gt; b) -&gt; b -&gt; b) -&gt; [[a]]
forall a. (forall b. (a -&gt; b -&gt; b) -&gt; b -&gt; b) -&gt; [a]
</span><a href="GHC.Base.html#build"><span class="hs-identifier hs-var">build</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679532304"><span class="annot"><span class="annottext">[a] -&gt; b -&gt; b
</span><a href="#local-6989586621679532304"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679532303"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532303"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1044"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679532302"><span class="annot"><span class="annottext">tailsGo :: [a] -&gt; b
</span><a href="#local-6989586621679532302"><span class="hs-identifier hs-var hs-var">tailsGo</span></a></span></span><span> </span><span id="local-6989586621679532301"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532301"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532301"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; b -&gt; b
</span><a href="#local-6989586621679532304"><span class="hs-operator hs-var">`c`</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532301"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1045"></span><span>                             </span><span class="hs-special">[</span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532303"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-1046"></span><span>                             </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679532300"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532300"><span class="hs-identifier hs-var">xs'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; b
</span><a href="#local-6989586621679532302"><span class="hs-identifier hs-var">tailsGo</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532300"><span class="hs-identifier hs-var">xs'</span></a></span><span>
</span><span id="line-1047"></span><span>  </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; b
</span><a href="#local-6989586621679532302"><span class="hs-identifier hs-var">tailsGo</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532305"><span class="hs-identifier hs-var">lst</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1048"></span><span>
</span><span id="line-1049"></span><span class="hs-comment">-- | The 'subsequences' function returns the list of all subsequences of the argument.</span><span>
</span><span id="line-1050"></span><span class="hs-comment">--</span><span>
</span><span id="line-1051"></span><span class="hs-comment">-- &gt;&gt;&gt; subsequences &quot;abc&quot;</span><span>
</span><span id="line-1052"></span><span class="hs-comment">-- [&quot;&quot;,&quot;a&quot;,&quot;b&quot;,&quot;ab&quot;,&quot;c&quot;,&quot;ac&quot;,&quot;bc&quot;,&quot;abc&quot;]</span><span>
</span><span id="line-1053"></span><span id="local-6989586621679532299"><span class="annot"><a href="Data.OldList.html#subsequences"><span class="hs-identifier hs-type">subsequences</span></a></span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532299"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532299"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span></span><span>
</span><span id="line-1054"></span><span id="subsequences"><span class="annot"><span class="annottext">subsequences :: forall a. [a] -&gt; [[a]]
</span><a href="Data.OldList.html#subsequences"><span class="hs-identifier hs-var hs-var">subsequences</span></a></span></span><span> </span><span id="local-6989586621679532298"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532298"><span class="hs-identifier hs-var">xs</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]] -&gt; [[a]]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]]
forall a. [a] -&gt; [[a]]
</span><a href="Data.OldList.html#nonEmptySubsequences"><span class="hs-identifier hs-var">nonEmptySubsequences</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532298"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-1055"></span><span>
</span><span id="line-1056"></span><span class="hs-comment">-- | The 'nonEmptySubsequences' function returns the list of all subsequences of the argument,</span><span>
</span><span id="line-1057"></span><span class="hs-comment">--   except for the empty list.</span><span>
</span><span id="line-1058"></span><span class="hs-comment">--</span><span>
</span><span id="line-1059"></span><span class="hs-comment">-- &gt;&gt;&gt; nonEmptySubsequences &quot;abc&quot;</span><span>
</span><span id="line-1060"></span><span class="hs-comment">-- [&quot;a&quot;,&quot;b&quot;,&quot;ab&quot;,&quot;c&quot;,&quot;ac&quot;,&quot;bc&quot;,&quot;abc&quot;]</span><span>
</span><span id="line-1061"></span><span id="local-6989586621679532296"><span class="annot"><a href="Data.OldList.html#nonEmptySubsequences"><span class="hs-identifier hs-type">nonEmptySubsequences</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532296"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532296"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span></span><span>
</span><span id="line-1062"></span><span id="nonEmptySubsequences"><span class="annot"><span class="annottext">nonEmptySubsequences :: forall a. [a] -&gt; [[a]]
</span><a href="Data.OldList.html#nonEmptySubsequences"><span class="hs-identifier hs-var hs-var">nonEmptySubsequences</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1063"></span><span class="annot"><a href="Data.OldList.html#nonEmptySubsequences"><span class="hs-identifier hs-var">nonEmptySubsequences</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532295"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532295"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532294"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532294"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">[</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532295"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]] -&gt; [[a]]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">([a] -&gt; [[a]] -&gt; [[a]]) -&gt; [[a]] -&gt; [[a]] -&gt; [[a]]
forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; [a] -&gt; b
</span><a href="GHC.Base.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]] -&gt; [[a]]
</span><a href="#local-6989586621679532293"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; [[a]]
forall a. [a] -&gt; [[a]]
</span><a href="Data.OldList.html#nonEmptySubsequences"><span class="hs-identifier hs-var">nonEmptySubsequences</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532294"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1064"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679532293"><span class="annot"><span class="annottext">f :: [a] -&gt; [[a]] -&gt; [[a]]
</span><a href="#local-6989586621679532293"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679532292"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532292"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span id="local-6989586621679532291"><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532291"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532292"><span class="hs-identifier hs-var">ys</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]] -&gt; [[a]]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532295"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532292"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]] -&gt; [[a]]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532291"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-1065"></span><span>
</span><span id="line-1066"></span><span>
</span><span id="line-1067"></span><span class="hs-comment">-- | The 'permutations' function returns the list of all permutations of the argument.</span><span>
</span><span id="line-1068"></span><span class="hs-comment">--</span><span>
</span><span id="line-1069"></span><span class="hs-comment">-- &gt;&gt;&gt; permutations &quot;abc&quot;</span><span>
</span><span id="line-1070"></span><span class="hs-comment">-- [&quot;abc&quot;,&quot;bac&quot;,&quot;cba&quot;,&quot;bca&quot;,&quot;cab&quot;,&quot;acb&quot;]</span><span>
</span><span id="line-1071"></span><span id="local-6989586621679532290"><span class="annot"><a href="Data.OldList.html#permutations"><span class="hs-identifier hs-type">permutations</span></a></span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532290"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532290"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span></span><span>
</span><span id="line-1072"></span><span id="permutations"><span class="annot"><span class="annottext">permutations :: forall a. [a] -&gt; [[a]]
</span><a href="Data.OldList.html#permutations"><span class="hs-identifier hs-var hs-var">permutations</span></a></span></span><span> </span><span id="local-6989586621679532289"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532289"><span class="hs-identifier hs-var">xs0</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532289"><span class="hs-identifier hs-var">xs0</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]] -&gt; [[a]]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [[a]]
forall {a}. [a] -&gt; [a] -&gt; [[a]]
</span><a href="#local-6989586621679532288"><span class="hs-identifier hs-var">perms</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532289"><span class="hs-identifier hs-var">xs0</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1073"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1074"></span><span>    </span><span id="local-6989586621679532288"><span class="annot"><span class="annottext">perms :: [a] -&gt; [a] -&gt; [[a]]
</span><a href="#local-6989586621679532288"><span class="hs-identifier hs-var hs-var">perms</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1075"></span><span>    </span><span class="annot"><a href="#local-6989586621679532288"><span class="hs-identifier hs-var">perms</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532287"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532287"><span class="hs-identifier hs-var">t</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532286"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532286"><span class="hs-identifier hs-var">ts</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679532285"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532285"><span class="hs-identifier hs-var">is</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([a] -&gt; [[a]] -&gt; [[a]]) -&gt; [[a]] -&gt; [[a]] -&gt; [[a]]
forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; [a] -&gt; b
</span><a href="GHC.Base.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]] -&gt; [[a]]
</span><a href="#local-6989586621679532284"><span class="hs-identifier hs-var">interleave</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [[a]]
</span><a href="#local-6989586621679532288"><span class="hs-identifier hs-var">perms</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532286"><span class="hs-identifier hs-var">ts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532287"><span class="hs-identifier hs-var">t</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532285"><span class="hs-identifier hs-var">is</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; [[a]]
forall a. [a] -&gt; [[a]]
</span><a href="Data.OldList.html#permutations"><span class="hs-identifier hs-var">permutations</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532285"><span class="hs-identifier hs-var">is</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1076"></span><span>      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679532284"><span class="annot"><span class="annottext">interleave :: [a] -&gt; [[a]] -&gt; [[a]]
</span><a href="#local-6989586621679532284"><span class="hs-identifier hs-var hs-var">interleave</span></a></span></span><span>    </span><span id="local-6989586621679532283"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532283"><span class="hs-identifier hs-var">xs</span></a></span></span><span>     </span><span id="local-6989586621679532282"><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532282"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621679532281"><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532281"><span class="hs-identifier hs-var">zs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([a] -&gt; [a]) -&gt; [a] -&gt; [[a]] -&gt; ([a], [[a]])
forall {a}. ([a] -&gt; a) -&gt; [a] -&gt; [a] -&gt; ([a], [a])
</span><a href="#local-6989586621679532280"><span class="hs-identifier hs-var">interleave'</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a]
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532283"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532282"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532281"><span class="hs-identifier hs-var">zs</span></a></span><span>
</span><span id="line-1077"></span><span>            </span><span id="local-6989586621679532280"><span class="annot"><span class="annottext">interleave' :: ([a] -&gt; a) -&gt; [a] -&gt; [a] -&gt; ([a], [a])
</span><a href="#local-6989586621679532280"><span class="hs-identifier hs-var hs-var">interleave'</span></a></span></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span id="local-6989586621679532279"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532279"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532286"><span class="hs-identifier hs-var">ts</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532279"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1078"></span><span>            </span><span class="annot"><a href="#local-6989586621679532280"><span class="hs-identifier hs-var">interleave'</span></a></span><span> </span><span id="local-6989586621679532278"><span class="annot"><span class="annottext">[a] -&gt; a
</span><a href="#local-6989586621679532278"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532277"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532277"><span class="hs-identifier hs-var">y</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532276"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532276"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679532275"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532275"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532274"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532274"><span class="hs-identifier hs-var">us</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679532273"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532273"><span class="hs-identifier hs-var">zs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([a] -&gt; a) -&gt; [a] -&gt; [a] -&gt; ([a], [a])
</span><a href="#local-6989586621679532280"><span class="hs-identifier hs-var">interleave'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; a
</span><a href="#local-6989586621679532278"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">([a] -&gt; a) -&gt; ([a] -&gt; [a]) -&gt; [a] -&gt; a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532277"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532276"><span class="hs-identifier hs-var">ys</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532275"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-1079"></span><span>                                     </span><span class="hs-keyword">in</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532277"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532274"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; a
</span><a href="#local-6989586621679532278"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532287"><span class="hs-identifier hs-var">t</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532277"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532274"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532273"><span class="hs-identifier hs-var">zs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1080"></span><span>
</span><span id="line-1081"></span><span>
</span><span id="line-1082"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-1083"></span><span class="hs-comment">-- Quick Sort algorithm taken from HBC's QSort library.</span><span>
</span><span id="line-1084"></span><span>
</span><span id="line-1085"></span><span class="hs-comment">-- | The 'sort' function implements a stable sorting algorithm.</span><span>
</span><span id="line-1086"></span><span class="hs-comment">-- It is a special case of 'sortBy', which allows the programmer to supply</span><span>
</span><span id="line-1087"></span><span class="hs-comment">-- their own comparison function.</span><span>
</span><span id="line-1088"></span><span class="hs-comment">--</span><span>
</span><span id="line-1089"></span><span class="hs-comment">-- Elements are arranged from lowest to highest, keeping duplicates in</span><span>
</span><span id="line-1090"></span><span class="hs-comment">-- the order they appeared in the input.</span><span>
</span><span id="line-1091"></span><span class="hs-comment">--</span><span>
</span><span id="line-1092"></span><span class="hs-comment">-- &gt;&gt;&gt; sort [1,6,4,3,2,5]</span><span>
</span><span id="line-1093"></span><span class="hs-comment">-- [1,2,3,4,5,6]</span><span>
</span><span id="line-1094"></span><span id="local-6989586621679533050"><span class="annot"><a href="Data.OldList.html#sort"><span class="hs-identifier hs-type">sort</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-type">Ord</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533050"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533050"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533050"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-1095"></span><span>
</span><span id="line-1096"></span><span class="hs-comment">-- | The 'sortBy' function is the non-overloaded version of 'sort'.</span><span>
</span><span id="line-1097"></span><span class="hs-comment">--</span><span>
</span><span id="line-1098"></span><span class="hs-comment">-- &gt;&gt;&gt; sortBy (\(a,_) (b,_) -&gt; compare a b) [(2, &quot;world&quot;), (4, &quot;!&quot;), (1, &quot;Hello&quot;)]</span><span>
</span><span id="line-1099"></span><span class="hs-comment">-- [(1,&quot;Hello&quot;),(2,&quot;world&quot;),(4,&quot;!&quot;)]</span><span>
</span><span id="line-1100"></span><span id="local-6989586621679533048"><span class="annot"><a href="Data.OldList.html#sortBy"><span class="hs-identifier hs-type">sortBy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533048"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533048"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Ordering"><span class="hs-identifier hs-type">Ordering</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533048"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533048"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span class="hs-cpp">

#if defined(USE_REPORT_PRELUDE)
</span><span class="hs-identifier">sort</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">sortBy</span><span> </span><span class="hs-identifier">compare</span><span>
</span><span id="line-1104"></span><span class="hs-identifier">sortBy</span><span> </span><span class="hs-identifier">cmp</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">foldr</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">insertBy</span><span> </span><span class="hs-identifier">cmp</span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-cpp">
#else
</span><span>
</span><span id="line-1107"></span><span class="hs-comment">{-
GHC's mergesort replaced by a better implementation, 24/12/2009.
This code originally contributed to the nhc12 compiler by Thomas Nordin
in 2002.  Rumoured to have been based on code by Lennart Augustsson, e.g.
    http://www.mail-archive.com/haskell@haskell.org/msg01822.html
and possibly to bear similarities to a 1982 paper by Richard O'Keefe:
&quot;A smooth applicative merge sort&quot;.

Benchmarks show it to be often 2x the speed of the previous implementation.
Fixes ticket https://gitlab.haskell.org/ghc/ghc/issues/2143
-}</span><span>
</span><span id="line-1118"></span><span>
</span><span id="line-1119"></span><span id="sort"><span class="annot"><span class="annottext">sort :: forall a. Ord a =&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#sort"><span class="hs-identifier hs-var hs-var">sort</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var">compare</span></a></span><span>
</span><span id="line-1120"></span><span id="sortBy"><span class="annot"><span class="annottext">sortBy :: forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#sortBy"><span class="hs-identifier hs-var hs-var">sortBy</span></a></span></span><span> </span><span id="local-6989586621679532270"><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679532270"><span class="hs-identifier hs-var">cmp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[a]] -&gt; [a]
</span><a href="#local-6989586621679532269"><span class="hs-identifier hs-var">mergeAll</span></a></span><span> </span><span class="annot"><span class="annottext">([[a]] -&gt; [a]) -&gt; ([a] -&gt; [[a]]) -&gt; [a] -&gt; [a]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]]
</span><a href="#local-6989586621679532268"><span class="hs-identifier hs-var">sequences</span></a></span><span>
</span><span id="line-1121"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1122"></span><span>    </span><span id="local-6989586621679532268"><span class="annot"><span class="annottext">sequences :: [a] -&gt; [[a]]
</span><a href="#local-6989586621679532268"><span class="hs-identifier hs-var hs-var">sequences</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532263"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532263"><span class="hs-identifier hs-var">a</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532262"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532262"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532261"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532261"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1123"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532263"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679532270"><span class="hs-operator hs-var">`cmp`</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532262"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Ordering -&gt; Ordering -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a] -&gt; [[a]]
</span><a href="#local-6989586621679532260"><span class="hs-identifier hs-var">descending</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532262"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532263"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">]</span><span>  </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532261"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-1124"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; ([a] -&gt; [a]) -&gt; [a] -&gt; [[a]]
</span><a href="#local-6989586621679532259"><span class="hs-identifier hs-var">ascending</span></a></span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532262"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532263"><span class="hs-identifier hs-var">a</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532261"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-1125"></span><span>    </span><span class="annot"><a href="#local-6989586621679532268"><span class="hs-identifier hs-var">sequences</span></a></span><span> </span><span id="local-6989586621679532258"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532258"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532258"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1126"></span><span>
</span><span id="line-1127"></span><span>    </span><span id="local-6989586621679532260"><span class="annot"><span class="annottext">descending :: a -&gt; [a] -&gt; [a] -&gt; [[a]]
</span><a href="#local-6989586621679532260"><span class="hs-identifier hs-var hs-var">descending</span></a></span></span><span> </span><span id="local-6989586621679532257"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532257"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679532256"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532256"><span class="hs-keyword hs-var">as</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532255"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532255"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532254"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532254"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1128"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532257"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679532270"><span class="hs-operator hs-var">`cmp`</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532255"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Ordering -&gt; Ordering -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a] -&gt; [[a]]
</span><a href="#local-6989586621679532260"><span class="hs-identifier hs-var">descending</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532255"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532257"><span class="hs-identifier hs-var">a</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532256"><span class="hs-keyword hs-var">as</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532254"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-1129"></span><span>    </span><span class="annot"><a href="#local-6989586621679532260"><span class="hs-identifier hs-var">descending</span></a></span><span> </span><span id="local-6989586621679532253"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532253"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679532252"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532252"><span class="hs-keyword hs-var">as</span></a></span></span><span> </span><span id="local-6989586621679532251"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532251"><span class="hs-identifier hs-var">bs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532253"><span class="hs-identifier hs-var">a</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532252"><span class="hs-keyword hs-var">as</span></a></span><span class="hs-special">)</span><span class="annot"><span class="annottext">[a] -&gt; [[a]] -&gt; [[a]]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]]
</span><a href="#local-6989586621679532268"><span class="hs-identifier hs-var">sequences</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532251"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-1130"></span><span>
</span><span id="line-1131"></span><span>    </span><span id="local-6989586621679532259"><span class="annot"><span class="annottext">ascending :: a -&gt; ([a] -&gt; [a]) -&gt; [a] -&gt; [[a]]
</span><a href="#local-6989586621679532259"><span class="hs-identifier hs-var hs-var">ascending</span></a></span></span><span> </span><span id="local-6989586621679532250"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532250"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679532249"><span class="annot"><span class="annottext">[a] -&gt; [a]
</span><a href="#local-6989586621679532249"><span class="hs-keyword hs-var">as</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532248"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532248"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532247"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532247"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1132"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532250"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679532270"><span class="hs-operator hs-var">`cmp`</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532248"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Ordering -&gt; Ordering -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; ([a] -&gt; [a]) -&gt; [a] -&gt; [[a]]
</span><a href="#local-6989586621679532259"><span class="hs-identifier hs-var">ascending</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532248"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679532245"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532245"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a]
</span><a href="#local-6989586621679532249"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532250"><span class="hs-identifier hs-var">a</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532245"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532247"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-1133"></span><span>    </span><span class="annot"><a href="#local-6989586621679532259"><span class="hs-identifier hs-var">ascending</span></a></span><span> </span><span id="local-6989586621679532244"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532244"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679532243"><span class="annot"><span class="annottext">[a] -&gt; [a]
</span><a href="#local-6989586621679532243"><span class="hs-keyword hs-var">as</span></a></span></span><span> </span><span id="local-6989586621679532242"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532242"><span class="hs-identifier hs-var">bs</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679532241"><span class="annot"><span class="annottext">x :: [a]
</span><a href="#local-6989586621679532241"><span class="hs-identifier hs-var hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a]
</span><a href="#local-6989586621679532243"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532244"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1134"></span><span>                          </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532241"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]] -&gt; [[a]]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]]
</span><a href="#local-6989586621679532268"><span class="hs-identifier hs-var">sequences</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532242"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-1135"></span><span>
</span><span id="line-1136"></span><span>    </span><span id="local-6989586621679532269"><span class="annot"><span class="annottext">mergeAll :: [[a]] -&gt; [a]
</span><a href="#local-6989586621679532269"><span class="hs-identifier hs-var hs-var">mergeAll</span></a></span></span><span> </span><span class="hs-special">[</span><span id="local-6989586621679532240"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532240"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532240"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-1137"></span><span>    </span><span class="annot"><a href="#local-6989586621679532269"><span class="hs-identifier hs-var">mergeAll</span></a></span><span> </span><span id="local-6989586621679532239"><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532239"><span class="hs-identifier hs-var">xs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[a]] -&gt; [a]
</span><a href="#local-6989586621679532269"><span class="hs-identifier hs-var">mergeAll</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[[a]] -&gt; [[a]]
</span><a href="#local-6989586621679532238"><span class="hs-identifier hs-var">mergePairs</span></a></span><span> </span><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532239"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1138"></span><span>
</span><span id="line-1139"></span><span>    </span><span id="local-6989586621679532238"><span class="annot"><span class="annottext">mergePairs :: [[a]] -&gt; [[a]]
</span><a href="#local-6989586621679532238"><span class="hs-identifier hs-var hs-var">mergePairs</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532237"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532237"><span class="hs-identifier hs-var">a</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532236"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532236"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532235"><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532235"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679532234"><span class="annot"><span class="annottext">x :: [a]
</span><a href="#local-6989586621679532234"><span class="hs-identifier hs-var hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621679532233"><span class="hs-identifier hs-var">merge</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532237"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532236"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-1140"></span><span>                          </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532234"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]] -&gt; [[a]]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[[a]] -&gt; [[a]]
</span><a href="#local-6989586621679532238"><span class="hs-identifier hs-var">mergePairs</span></a></span><span> </span><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532235"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-1141"></span><span>    </span><span class="annot"><a href="#local-6989586621679532238"><span class="hs-identifier hs-var">mergePairs</span></a></span><span> </span><span id="local-6989586621679532232"><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532232"><span class="hs-identifier hs-var">xs</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621679532232"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-1142"></span><span>
</span><span id="line-1143"></span><span>    </span><span id="local-6989586621679532233"><span class="annot"><span class="annottext">merge :: [a] -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621679532233"><span class="hs-identifier hs-var hs-var">merge</span></a></span></span><span> </span><span id="local-6989586621679532230"><span class="annot"><span class="annottext">as :: [a]
</span><a href="#local-6989586621679532230"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621679532229"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532229"><span class="hs-identifier hs-var">a</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532228"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532228"><span class="hs-identifier hs-var">as'</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679532227"><span class="annot"><span class="annottext">bs :: [a]
</span><a href="#local-6989586621679532227"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621679532226"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532226"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532225"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532225"><span class="hs-identifier hs-var">bs'</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1144"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532229"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679532270"><span class="hs-operator hs-var">`cmp`</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532226"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Ordering -&gt; Ordering -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532226"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621679532233"><span class="hs-identifier hs-var">merge</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532230"><span class="hs-keyword hs-var">as</span></a></span><span>  </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532225"><span class="hs-identifier hs-var">bs'</span></a></span><span>
</span><span id="line-1145"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532229"><span class="hs-identifier hs-var">a</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621679532233"><span class="hs-identifier hs-var">merge</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532228"><span class="hs-identifier hs-var">as'</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532227"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-1146"></span><span>    </span><span class="annot"><a href="#local-6989586621679532233"><span class="hs-identifier hs-var">merge</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621679532224"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532224"><span class="hs-identifier hs-var">bs</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532224"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-1147"></span><span>    </span><span class="annot"><a href="#local-6989586621679532233"><span class="hs-identifier hs-var">merge</span></a></span><span> </span><span id="local-6989586621679532223"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532223"><span class="hs-keyword hs-var">as</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532223"><span class="hs-keyword hs-var">as</span></a></span><span>
</span><span id="line-1148"></span><span>
</span><span id="line-1149"></span><span class="hs-comment">{-
sortBy cmp l = mergesort cmp l
sort l = mergesort compare l

Quicksort replaced by mergesort, 14/5/2002.

From: Ian Lynagh &lt;igloo@earth.li&gt;

I am curious as to why the List.sort implementation in GHC is a
quicksort algorithm rather than an algorithm that guarantees n log n
time in the worst case? I have attached a mergesort implementation along
with a few scripts to time it's performance, the results of which are
shown below (* means it didn't finish successfully - in all cases this
was due to a stack overflow).

If I heap profile the random_list case with only 10000 then I see
random_list peaks at using about 2.5M of memory, whereas in the same
program using List.sort it uses only 100k.

Input style     Input length     Sort data     Sort alg    User time
stdin           10000            random_list   sort        2.82
stdin           10000            random_list   mergesort   2.96
stdin           10000            sorted        sort        31.37
stdin           10000            sorted        mergesort   1.90
stdin           10000            revsorted     sort        31.21
stdin           10000            revsorted     mergesort   1.88
stdin           100000           random_list   sort        *
stdin           100000           random_list   mergesort   *
stdin           100000           sorted        sort        *
stdin           100000           sorted        mergesort   *
stdin           100000           revsorted     sort        *
stdin           100000           revsorted     mergesort   *
func            10000            random_list   sort        0.31
func            10000            random_list   mergesort   0.91
func            10000            sorted        sort        19.09
func            10000            sorted        mergesort   0.15
func            10000            revsorted     sort        19.17
func            10000            revsorted     mergesort   0.16
func            100000           random_list   sort        3.85
func            100000           random_list   mergesort   *
func            100000           sorted        sort        5831.47
func            100000           sorted        mergesort   2.23
func            100000           revsorted     sort        5872.34
func            100000           revsorted     mergesort   2.24

mergesort :: (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
mergesort cmp = mergesort' cmp . map wrap

mergesort' :: (a -&gt; a -&gt; Ordering) -&gt; [[a]] -&gt; [a]
mergesort' _   [] = []
mergesort' _   [xs] = xs
mergesort' cmp xss = mergesort' cmp (merge_pairs cmp xss)

merge_pairs :: (a -&gt; a -&gt; Ordering) -&gt; [[a]] -&gt; [[a]]
merge_pairs _   [] = []
merge_pairs _   [xs] = [xs]
merge_pairs cmp (xs:ys:xss) = merge cmp xs ys : merge_pairs cmp xss

merge :: (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a] -&gt; [a]
merge _   [] ys = ys
merge _   xs [] = xs
merge cmp (x:xs) (y:ys)
 = case x `cmp` y of
        GT -&gt; y : merge cmp (x:xs)   ys
        _  -&gt; x : merge cmp    xs (y:ys)

wrap :: a -&gt; [a]
wrap x = [x]



OLDER: qsort version

-- qsort is stable and does not concatenate.
qsort :: (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a] -&gt; [a]
qsort _   []     r = r
qsort _   [x]    r = x:r
qsort cmp (x:xs) r = qpart cmp x xs [] [] r

-- qpart partitions and sorts the sublists
qpart :: (a -&gt; a -&gt; Ordering) -&gt; a -&gt; [a] -&gt; [a] -&gt; [a] -&gt; [a] -&gt; [a]
qpart cmp x [] rlt rge r =
    -- rlt and rge are in reverse order and must be sorted with an
    -- anti-stable sorting
    rqsort cmp rlt (x:rqsort cmp rge r)
qpart cmp x (y:ys) rlt rge r =
    case cmp x y of
        GT -&gt; qpart cmp x ys (y:rlt) rge r
        _  -&gt; qpart cmp x ys rlt (y:rge) r

-- rqsort is as qsort but anti-stable, i.e. reverses equal elements
rqsort :: (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a] -&gt; [a]
rqsort _   []     r = r
rqsort _   [x]    r = x:r
rqsort cmp (x:xs) r = rqpart cmp x xs [] [] r

rqpart :: (a -&gt; a -&gt; Ordering) -&gt; a -&gt; [a] -&gt; [a] -&gt; [a] -&gt; [a] -&gt; [a]
rqpart cmp x [] rle rgt r =
    qsort cmp rle (x:qsort cmp rgt r)
rqpart cmp x (y:ys) rle rgt r =
    case cmp y x of
        GT -&gt; rqpart cmp x ys rle (y:rgt) r
        _  -&gt; rqpart cmp x ys (y:rle) rgt r
-}</span><span class="hs-cpp">

#endif /* USE_REPORT_PRELUDE */
</span><span>
</span><span id="line-1256"></span><span class="hs-comment">-- | Sort a list by comparing the results of a key function applied to each</span><span>
</span><span id="line-1257"></span><span class="hs-comment">-- element.  @sortOn f@ is equivalent to @sortBy (comparing f)@, but has the</span><span>
</span><span id="line-1258"></span><span class="hs-comment">-- performance advantage of only evaluating @f@ once for each element in the</span><span>
</span><span id="line-1259"></span><span class="hs-comment">-- input list.  This is called the decorate-sort-undecorate paradigm, or</span><span>
</span><span id="line-1260"></span><span class="hs-comment">-- Schwartzian transform.</span><span>
</span><span id="line-1261"></span><span class="hs-comment">--</span><span>
</span><span id="line-1262"></span><span class="hs-comment">-- Elements are arranged from lowest to highest, keeping duplicates in</span><span>
</span><span id="line-1263"></span><span class="hs-comment">-- the order they appeared in the input.</span><span>
</span><span id="line-1264"></span><span class="hs-comment">--</span><span>
</span><span id="line-1265"></span><span class="hs-comment">-- &gt;&gt;&gt; sortOn fst [(2, &quot;world&quot;), (4, &quot;!&quot;), (1, &quot;Hello&quot;)]</span><span>
</span><span id="line-1266"></span><span class="hs-comment">-- [(1,&quot;Hello&quot;),(2,&quot;world&quot;),(4,&quot;!&quot;)]</span><span>
</span><span id="line-1267"></span><span class="hs-comment">--</span><span>
</span><span id="line-1268"></span><span class="hs-comment">-- @since 4.8.0.0</span><span>
</span><span id="line-1269"></span><span id="local-6989586621679533045"><span id="local-6989586621679533046"><span class="annot"><a href="Data.OldList.html#sortOn"><span class="hs-identifier hs-type">sortOn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-type">Ord</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533046"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533045"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533046"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533045"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533045"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-1270"></span><span id="sortOn"><span class="annot"><span class="annottext">sortOn :: forall b a. Ord b =&gt; (a -&gt; b) -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#sortOn"><span class="hs-identifier hs-var hs-var">sortOn</span></a></span></span><span> </span><span id="local-6989586621679532220"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679532220"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1271"></span><span>  </span><span class="annot"><span class="annottext">((b, a) -&gt; a) -&gt; [(b, a)] -&gt; [a]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(b, a) -&gt; a
forall a b. (a, b) -&gt; b
</span><a href="Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">([(b, a)] -&gt; [a]) -&gt; ([a] -&gt; [(b, a)]) -&gt; [a] -&gt; [a]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">((b, a) -&gt; (b, a) -&gt; Ordering) -&gt; [(b, a)] -&gt; [(b, a)]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((b, a) -&gt; b) -&gt; (b, a) -&gt; (b, a) -&gt; Ordering
forall a b. Ord a =&gt; (b -&gt; a) -&gt; b -&gt; b -&gt; Ordering
</span><a href="Data.Ord.html#comparing"><span class="hs-identifier hs-var">comparing</span></a></span><span> </span><span class="annot"><span class="annottext">(b, a) -&gt; b
forall a b. (a, b) -&gt; a
</span><a href="Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([(b, a)] -&gt; [(b, a)]) -&gt; ([a] -&gt; [(b, a)]) -&gt; [a] -&gt; [(b, a)]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; (b, a)) -&gt; [a] -&gt; [(b, a)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679532219"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532219"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679532218"><span class="annot"><span class="annottext">y :: b
</span><a href="#local-6989586621679532218"><span class="hs-identifier hs-var hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679532220"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532219"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532218"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; (b, a) -&gt; (b, a)
</span><a href="../../ghc-prim/src/GHC.Prim.html#seq"><span class="hs-operator hs-var">`seq`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532218"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532219"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1272"></span><span>
</span><span id="line-1273"></span><span class="hs-comment">-- | Produce singleton list.</span><span>
</span><span id="line-1274"></span><span class="hs-comment">--</span><span>
</span><span id="line-1275"></span><span class="hs-comment">-- &gt;&gt;&gt; singleton True</span><span>
</span><span id="line-1276"></span><span class="hs-comment">-- [True]</span><span>
</span><span id="line-1277"></span><span class="hs-comment">--</span><span>
</span><span id="line-1278"></span><span class="hs-comment">-- @since 4.15.0.0</span><span>
</span><span id="line-1279"></span><span class="hs-comment">--</span><span>
</span><span id="line-1280"></span><span id="local-6989586621679532217"><span class="annot"><a href="Data.OldList.html#singleton"><span class="hs-identifier hs-type">singleton</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679532217"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532217"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-1281"></span><span id="singleton"><span class="annot"><span class="annottext">singleton :: forall a. a -&gt; [a]
</span><a href="Data.OldList.html#singleton"><span class="hs-identifier hs-var hs-var">singleton</span></a></span></span><span> </span><span id="local-6989586621679532216"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532216"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532216"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1282"></span><span>
</span><span id="line-1283"></span><span class="hs-comment">-- | The 'unfoldr' function is a \`dual\' to 'foldr': while 'foldr'</span><span>
</span><span id="line-1284"></span><span class="hs-comment">-- reduces a list to a summary value, 'unfoldr' builds a list from</span><span>
</span><span id="line-1285"></span><span class="hs-comment">-- a seed value.  The function takes the element and returns 'Nothing'</span><span>
</span><span id="line-1286"></span><span class="hs-comment">-- if it is done producing the list or returns 'Just' @(a,b)@, in which</span><span>
</span><span id="line-1287"></span><span class="hs-comment">-- case, @a@ is a prepended to the list and @b@ is used as the next</span><span>
</span><span id="line-1288"></span><span class="hs-comment">-- element in a recursive call.  For example,</span><span>
</span><span id="line-1289"></span><span class="hs-comment">--</span><span>
</span><span id="line-1290"></span><span class="hs-comment">-- &gt; iterate f == unfoldr (\x -&gt; Just (x, f x))</span><span>
</span><span id="line-1291"></span><span class="hs-comment">--</span><span>
</span><span id="line-1292"></span><span class="hs-comment">-- In some cases, 'unfoldr' can undo a 'foldr' operation:</span><span>
</span><span id="line-1293"></span><span class="hs-comment">--</span><span>
</span><span id="line-1294"></span><span class="hs-comment">-- &gt; unfoldr f' (foldr f z xs) == xs</span><span>
</span><span id="line-1295"></span><span class="hs-comment">--</span><span>
</span><span id="line-1296"></span><span class="hs-comment">-- if the following holds:</span><span>
</span><span id="line-1297"></span><span class="hs-comment">--</span><span>
</span><span id="line-1298"></span><span class="hs-comment">-- &gt; f' (f x y) = Just (x,y)</span><span>
</span><span id="line-1299"></span><span class="hs-comment">-- &gt; f' z       = Nothing</span><span>
</span><span id="line-1300"></span><span class="hs-comment">--</span><span>
</span><span id="line-1301"></span><span class="hs-comment">-- A simple use of unfoldr:</span><span>
</span><span id="line-1302"></span><span class="hs-comment">--</span><span>
</span><span id="line-1303"></span><span class="hs-comment">-- &gt;&gt;&gt; unfoldr (\b -&gt; if b == 0 then Nothing else Just (b, b-1)) 10</span><span>
</span><span id="line-1304"></span><span class="hs-comment">-- [10,9,8,7,6,5,4,3,2,1]</span><span>
</span><span id="line-1305"></span><span class="hs-comment">--</span><span>
</span><span id="line-1306"></span><span>
</span><span id="line-1307"></span><span class="hs-comment">-- Note [INLINE unfoldr]</span><span>
</span><span id="line-1308"></span><span class="hs-comment">-- We treat unfoldr a little differently from some other forms for list fusion</span><span>
</span><span id="line-1309"></span><span class="hs-comment">-- for two reasons:</span><span>
</span><span id="line-1310"></span><span class="hs-comment">--</span><span>
</span><span id="line-1311"></span><span class="hs-comment">-- 1. We don't want to use a rule to rewrite a basic form to a fusible</span><span>
</span><span id="line-1312"></span><span class="hs-comment">-- form because this would inline before constant floating. As Simon Peyton-</span><span>
</span><span id="line-1313"></span><span class="hs-comment">-- Jones and others have pointed out, this could reduce sharing in some cases</span><span>
</span><span id="line-1314"></span><span class="hs-comment">-- where sharing is beneficial. Thus we simply INLINE it, which is, for</span><span>
</span><span id="line-1315"></span><span class="hs-comment">-- example, how enumFromTo::Int becomes eftInt. Unfortunately, we don't seem</span><span>
</span><span id="line-1316"></span><span class="hs-comment">-- to get enough of an inlining discount to get a version of eftInt based on</span><span>
</span><span id="line-1317"></span><span class="hs-comment">-- unfoldr to inline as readily as the usual one. We know that all the Maybe</span><span>
</span><span id="line-1318"></span><span class="hs-comment">-- nonsense will go away, but the compiler does not.</span><span>
</span><span id="line-1319"></span><span class="hs-comment">--</span><span>
</span><span id="line-1320"></span><span class="hs-comment">-- 2. The benefit of inlining unfoldr is likely to be huge in many common cases,</span><span>
</span><span id="line-1321"></span><span class="hs-comment">-- even apart from list fusion. In particular, inlining unfoldr often</span><span>
</span><span id="line-1322"></span><span class="hs-comment">-- allows GHC to erase all the Maybes. This appears to be critical if unfoldr</span><span>
</span><span id="line-1323"></span><span class="hs-comment">-- is to be used in high-performance code. A small increase in code size</span><span>
</span><span id="line-1324"></span><span class="hs-comment">-- in the relatively rare cases when this does not happen looks like a very</span><span>
</span><span id="line-1325"></span><span class="hs-comment">-- small price to pay.</span><span>
</span><span id="line-1326"></span><span class="hs-comment">--</span><span>
</span><span id="line-1327"></span><span class="hs-comment">-- Doing a back-and-forth dance doesn't seem to accomplish anything if the</span><span>
</span><span id="line-1328"></span><span class="hs-comment">-- final form has to be inlined in any case.</span><span>
</span><span id="line-1329"></span><span>
</span><span id="line-1330"></span><span id="local-6989586621679533034"><span id="local-6989586621679533035"><span class="annot"><a href="Data.OldList.html#unfoldr"><span class="hs-identifier hs-type">unfoldr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533035"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679533034"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679533035"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533035"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533034"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-1331"></span><span>
</span><span id="line-1332"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.OldList.html#unfoldr"><span class="hs-pragma hs-type">unfoldr</span></a></span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-comment">-- See Note [INLINE unfoldr]</span><span>
</span><span id="line-1333"></span><span id="unfoldr"><span class="annot"><span class="annottext">unfoldr :: forall b a. (b -&gt; Maybe (a, b)) -&gt; b -&gt; [a]
</span><a href="Data.OldList.html#unfoldr"><span class="hs-identifier hs-var hs-var">unfoldr</span></a></span></span><span> </span><span id="local-6989586621679532215"><span class="annot"><span class="annottext">b -&gt; Maybe (a, b)
</span><a href="#local-6989586621679532215"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679532214"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532214"><span class="hs-identifier hs-var">b0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall b. (a -&gt; b -&gt; b) -&gt; b -&gt; b) -&gt; [a]
forall a. (forall b. (a -&gt; b -&gt; b) -&gt; b -&gt; b) -&gt; [a]
</span><a href="GHC.Base.html#build"><span class="hs-identifier hs-var">build</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679532213"><span class="annot"><span class="annottext">a -&gt; b -&gt; b
</span><a href="#local-6989586621679532213"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679532212"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532212"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1334"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679532211"><span class="annot"><span class="annottext">go :: b -&gt; b
</span><a href="#local-6989586621679532211"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679532210"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532210"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">b -&gt; Maybe (a, b)
</span><a href="#local-6989586621679532215"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532210"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1335"></span><span>               </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532209"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532209"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679532208"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532208"><span class="hs-identifier hs-var">new_b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532209"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; b
</span><a href="#local-6989586621679532213"><span class="hs-operator hs-var">`c`</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; b
</span><a href="#local-6989586621679532211"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532208"><span class="hs-identifier hs-var">new_b</span></a></span><span>
</span><span id="line-1336"></span><span>               </span><span class="annot"><span class="annottext">Maybe (a, b)
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532212"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-1337"></span><span>  </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">b -&gt; b
</span><a href="#local-6989586621679532211"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532214"><span class="hs-identifier hs-var">b0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1338"></span><span>
</span><span id="line-1339"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-1340"></span><span class="hs-comment">-- Functions on strings</span><span>
</span><span id="line-1341"></span><span>
</span><span id="line-1342"></span><span class="hs-comment">-- | 'lines' breaks a string up into a list of strings at newline</span><span>
</span><span id="line-1343"></span><span class="hs-comment">-- characters.  The resulting strings do not contain newlines.</span><span>
</span><span id="line-1344"></span><span class="hs-comment">--</span><span>
</span><span id="line-1345"></span><span class="hs-comment">-- Note that after splitting the string at newline characters, the</span><span>
</span><span id="line-1346"></span><span class="hs-comment">-- last part of the string is considered a line even if it doesn't end</span><span>
</span><span id="line-1347"></span><span class="hs-comment">-- with a newline. For example,</span><span>
</span><span id="line-1348"></span><span class="hs-comment">--</span><span>
</span><span id="line-1349"></span><span class="hs-comment">-- &gt;&gt;&gt; lines &quot;&quot;</span><span>
</span><span id="line-1350"></span><span class="hs-comment">-- []</span><span>
</span><span id="line-1351"></span><span class="hs-comment">--</span><span>
</span><span id="line-1352"></span><span class="hs-comment">-- &gt;&gt;&gt; lines &quot;\n&quot;</span><span>
</span><span id="line-1353"></span><span class="hs-comment">-- [&quot;&quot;]</span><span>
</span><span id="line-1354"></span><span class="hs-comment">--</span><span>
</span><span id="line-1355"></span><span class="hs-comment">-- &gt;&gt;&gt; lines &quot;one&quot;</span><span>
</span><span id="line-1356"></span><span class="hs-comment">-- [&quot;one&quot;]</span><span>
</span><span id="line-1357"></span><span class="hs-comment">--</span><span>
</span><span id="line-1358"></span><span class="hs-comment">-- &gt;&gt;&gt; lines &quot;one\n&quot;</span><span>
</span><span id="line-1359"></span><span class="hs-comment">-- [&quot;one&quot;]</span><span>
</span><span id="line-1360"></span><span class="hs-comment">--</span><span>
</span><span id="line-1361"></span><span class="hs-comment">-- &gt;&gt;&gt; lines &quot;one\n\n&quot;</span><span>
</span><span id="line-1362"></span><span class="hs-comment">-- [&quot;one&quot;,&quot;&quot;]</span><span>
</span><span id="line-1363"></span><span class="hs-comment">--</span><span>
</span><span id="line-1364"></span><span class="hs-comment">-- &gt;&gt;&gt; lines &quot;one\ntwo&quot;</span><span>
</span><span id="line-1365"></span><span class="hs-comment">-- [&quot;one&quot;,&quot;two&quot;]</span><span>
</span><span id="line-1366"></span><span class="hs-comment">--</span><span>
</span><span id="line-1367"></span><span class="hs-comment">-- &gt;&gt;&gt; lines &quot;one\ntwo\n&quot;</span><span>
</span><span id="line-1368"></span><span class="hs-comment">-- [&quot;one&quot;,&quot;two&quot;]</span><span>
</span><span id="line-1369"></span><span class="hs-comment">--</span><span>
</span><span id="line-1370"></span><span class="hs-comment">-- Thus @'lines' s@ contains at least as many elements as newlines in @s@.</span><span>
</span><span id="line-1371"></span><span class="annot"><a href="Data.OldList.html#lines"><span class="hs-identifier hs-type">lines</span></a></span><span>                   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1372"></span><span id="lines"><span class="annot"><span class="annottext">lines :: [Char] -&gt; [[Char]]
</span><a href="Data.OldList.html#lines"><span class="hs-identifier hs-var hs-var">lines</span></a></span></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;&quot;</span></span><span>                </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1373"></span><span class="hs-comment">-- Somehow GHC doesn't detect the selector thunks in the below code,</span><span>
</span><span id="line-1374"></span><span class="hs-comment">-- so s' keeps a reference to the first line via the pair and we have</span><span>
</span><span id="line-1375"></span><span class="hs-comment">-- a space leak (cf. #4334).</span><span>
</span><span id="line-1376"></span><span class="hs-comment">-- So we need to make GHC see the selector thunks with a trick.</span><span>
</span><span id="line-1377"></span><span class="annot"><a href="Data.OldList.html#lines"><span class="hs-identifier hs-var">lines</span></a></span><span> </span><span id="local-6989586621679532207"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532207"><span class="hs-identifier hs-var">s</span></a></span></span><span>                 </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">([Char], [[Char]]) -&gt; [[Char]]
forall {a}. (a, [a]) -&gt; [a]
</span><a href="#local-6989586621679532206"><span class="hs-identifier hs-var">cons</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; [Char] -&gt; ([Char], [Char])
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="GHC.List.html#break"><span class="hs-identifier hs-var">break</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\n'</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532207"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1378"></span><span>                                    </span><span class="hs-special">(</span><span id="local-6989586621679532205"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532205"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679532204"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532204"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532205"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532204"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1379"></span><span>                                                    </span><span class="hs-special">[</span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1380"></span><span>                                                    </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532203"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532203"><span class="hs-identifier hs-var">s''</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [[Char]]
</span><a href="Data.OldList.html#lines"><span class="hs-identifier hs-var">lines</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532203"><span class="hs-identifier hs-var">s''</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1381"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1382"></span><span>    </span><span id="local-6989586621679532206"><span class="annot"><span class="annottext">cons :: (a, [a]) -&gt; [a]
</span><a href="#local-6989586621679532206"><span class="hs-identifier hs-var hs-var">cons</span></a></span></span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679532202"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532202"><span class="hs-identifier hs-var">h</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679532201"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532201"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532202"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532201"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-1383"></span><span>
</span><span id="line-1384"></span><span class="hs-comment">-- | 'unlines' is an inverse operation to 'lines'.</span><span>
</span><span id="line-1385"></span><span class="hs-comment">-- It joins lines, after appending a terminating newline to each.</span><span>
</span><span id="line-1386"></span><span class="hs-comment">--</span><span>
</span><span id="line-1387"></span><span class="hs-comment">-- &gt;&gt;&gt; unlines [&quot;Hello&quot;, &quot;World&quot;, &quot;!&quot;]</span><span>
</span><span id="line-1388"></span><span class="hs-comment">-- &quot;Hello\nWorld\n!\n&quot;</span><span>
</span><span id="line-1389"></span><span class="annot"><a href="Data.OldList.html#unlines"><span class="hs-identifier hs-type">unlines</span></a></span><span>                 </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-cpp">
#if defined(USE_REPORT_PRELUDE)
</span><span class="hs-identifier">unlines</span><span>                 </span><span class="hs-glyph">=</span><span>  </span><span class="hs-identifier">concatMap</span><span> </span><span class="hs-special">(</span><span class="hs-operator">++</span><span> </span><span class="hs-string">&quot;\n&quot;</span><span class="hs-special">)</span><span class="hs-cpp">
#else
</span><span class="hs-comment">-- HBC version (stolen)</span><span>
</span><span id="line-1394"></span><span class="hs-comment">-- here's a more efficient version</span><span>
</span><span id="line-1395"></span><span id="unlines"><span class="annot"><span class="annottext">unlines :: [[Char]] -&gt; [Char]
</span><a href="Data.OldList.html#unlines"><span class="hs-identifier hs-var hs-var">unlines</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1396"></span><span class="annot"><a href="Data.OldList.html#unlines"><span class="hs-identifier hs-var">unlines</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532200"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532200"><span class="hs-identifier hs-var">l</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532199"><span class="annot"><span class="annottext">[[Char]]
</span><a href="#local-6989586621679532199"><span class="hs-identifier hs-var">ls</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532200"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\n'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; [Char] -&gt; [Char]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[[Char]] -&gt; [Char]
</span><a href="Data.OldList.html#unlines"><span class="hs-identifier hs-var">unlines</span></a></span><span> </span><span class="annot"><span class="annottext">[[Char]]
</span><a href="#local-6989586621679532199"><span class="hs-identifier hs-var">ls</span></a></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-1399"></span><span class="hs-comment">-- | 'words' breaks a string up into a list of words, which were delimited</span><span>
</span><span id="line-1400"></span><span class="hs-comment">-- by white space.</span><span>
</span><span id="line-1401"></span><span class="hs-comment">--</span><span>
</span><span id="line-1402"></span><span class="hs-comment">-- &gt;&gt;&gt; words &quot;Lorem ipsum\ndolor&quot;</span><span>
</span><span id="line-1403"></span><span class="hs-comment">-- [&quot;Lorem&quot;,&quot;ipsum&quot;,&quot;dolor&quot;]</span><span>
</span><span id="line-1404"></span><span class="annot"><a href="Data.OldList.html#words"><span class="hs-identifier hs-type">words</span></a></span><span>                   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1405"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#words"><span class="hs-pragma hs-type">words</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-1406"></span><span id="words"><span class="annot"><span class="annottext">words :: [Char] -&gt; [[Char]]
</span><a href="Data.OldList.html#words"><span class="hs-identifier hs-var hs-var">words</span></a></span></span><span> </span><span id="local-6989586621679532198"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532198"><span class="hs-identifier hs-var">s</span></a></span></span><span>                 </span><span class="hs-glyph">=</span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; [Char] -&gt; [Char]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="GHC.List.html#dropWhile"><span class="hs-identifier hs-var">dropWhile</span></a></span><span> </span><span class="hs-comment">{-partain:Char.-}</span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532198"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1407"></span><span>                                </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1408"></span><span>                                </span><span id="local-6989586621679532197"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532197"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532196"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [[Char]] -&gt; [[Char]]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [[Char]]
</span><a href="Data.OldList.html#words"><span class="hs-identifier hs-var">words</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532195"><span class="hs-identifier hs-var">s''</span></a></span><span>
</span><span id="line-1409"></span><span>                                      </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532196"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532196"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679532195"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532195"><span class="hs-identifier hs-var">s''</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1410"></span><span>                                             </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; [Char] -&gt; ([Char], [Char])
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="GHC.List.html#break"><span class="hs-identifier hs-var">break</span></a></span><span> </span><span class="hs-comment">{-partain:Char.-}</span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532197"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-1411"></span><span>
</span><span id="line-1412"></span><span class="hs-pragma">{-# RULES</span><span>
</span><span id="line-1413"></span><span class="annot"><span class="hs-pragma">&quot;words&quot;</span></span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">~</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532194"><span class="annot"><a href="#local-6989586621679532194"><span class="hs-pragma hs-var">s</span></a></span></span><span> </span><span class="hs-pragma">.</span><span> </span><span class="annot"><a href="Data.OldList.html#words"><span class="hs-pragma hs-type">words</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532194"><span class="hs-pragma hs-type">s</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Base.html#build"><span class="hs-pragma hs-type">build</span></a></span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">\</span><span id="local-6989586621679532193"><span class="annot"><a href="#local-6989586621679532193"><span class="hs-pragma hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679532192"><span class="annot"><a href="#local-6989586621679532192"><span class="hs-pragma hs-var">n</span></a></span></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="Data.OldList.html#wordsFB"><span class="hs-pragma hs-type">wordsFB</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532193"><span class="hs-pragma hs-type">c</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532192"><span class="hs-pragma hs-type">n</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532194"><span class="hs-pragma hs-type">s</span></a></span><span class="hs-pragma">)</span><span>
</span><span id="line-1414"></span><span class="annot"><span class="hs-pragma">&quot;wordsList&quot;</span></span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#wordsFB"><span class="hs-pragma hs-type">wordsFB</span></a></span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">:</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">]</span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="Data.OldList.html#words"><span class="hs-pragma hs-type">words</span></a></span><span>
</span><span id="line-1415"></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-1416"></span><span id="local-6989586621679533029"><span class="annot"><a href="Data.OldList.html#wordsFB"><span class="hs-identifier hs-type">wordsFB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533029"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533029"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533029"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533029"><span class="hs-identifier hs-type">b</span></a></span></span><span>
</span><span id="line-1417"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#wordsFB"><span class="hs-pragma hs-type">wordsFB</span></a></span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-comment">-- See Note [Inline FB functions] in GHC.List</span><span>
</span><span id="line-1418"></span><span id="wordsFB"><span class="annot"><span class="annottext">wordsFB :: forall b. ([Char] -&gt; b -&gt; b) -&gt; b -&gt; [Char] -&gt; b
</span><a href="Data.OldList.html#wordsFB"><span class="hs-identifier hs-var hs-var">wordsFB</span></a></span></span><span> </span><span id="local-6989586621679532190"><span class="annot"><span class="annottext">[Char] -&gt; b -&gt; b
</span><a href="#local-6989586621679532190"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679532189"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532189"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; b
</span><a href="#local-6989586621679532188"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-1419"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1420"></span><span>    </span><span id="local-6989586621679532188"><span class="annot"><span class="annottext">go :: [Char] -&gt; b
</span><a href="#local-6989586621679532188"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679532187"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532187"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; [Char] -&gt; [Char]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="GHC.List.html#dropWhile"><span class="hs-identifier hs-var">dropWhile</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532187"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1421"></span><span>             </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679532189"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-1422"></span><span>             </span><span id="local-6989586621679532186"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532186"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532185"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; b -&gt; b
</span><a href="#local-6989586621679532190"><span class="hs-operator hs-var">`c`</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; b
</span><a href="#local-6989586621679532188"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532184"><span class="hs-identifier hs-var">s''</span></a></span><span>
</span><span id="line-1423"></span><span>                   </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532185"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532185"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679532184"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532184"><span class="hs-identifier hs-var">s''</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; [Char] -&gt; ([Char], [Char])
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="GHC.List.html#break"><span class="hs-identifier hs-var">break</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532186"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-1424"></span><span>
</span><span id="line-1425"></span><span class="hs-comment">-- | 'unwords' is an inverse operation to 'words'.</span><span>
</span><span id="line-1426"></span><span class="hs-comment">-- It joins words with separating spaces.</span><span>
</span><span id="line-1427"></span><span class="hs-comment">--</span><span>
</span><span id="line-1428"></span><span class="hs-comment">-- &gt;&gt;&gt; unwords [&quot;Lorem&quot;, &quot;ipsum&quot;, &quot;dolor&quot;]</span><span>
</span><span id="line-1429"></span><span class="hs-comment">-- &quot;Lorem ipsum dolor&quot;</span><span>
</span><span id="line-1430"></span><span class="annot"><a href="Data.OldList.html#unwords"><span class="hs-identifier hs-type">unwords</span></a></span><span>                 </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-cpp">
#if defined(USE_REPORT_PRELUDE)
</span><span class="hs-identifier">unwords</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="hs-string">&quot;&quot;</span><span>
</span><span id="line-1433"></span><span class="hs-identifier">unwords</span><span> </span><span class="hs-identifier">ws</span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="hs-identifier">foldr1</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-identifier">w</span><span> </span><span class="hs-identifier">s</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">w</span><span> </span><span class="hs-operator">++</span><span> </span><span class="hs-char">' '</span><span class="hs-glyph">:</span><span class="hs-identifier">s</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">ws</span><span class="hs-cpp">
#else
</span><span class="hs-comment">-- Here's a lazier version that can get the last element of a</span><span>
</span><span id="line-1436"></span><span class="hs-comment">-- _|_-terminated list.</span><span>
</span><span id="line-1437"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#unwords"><span class="hs-pragma hs-type">unwords</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-1438"></span><span id="unwords"><span class="annot"><span class="annottext">unwords :: [[Char]] -&gt; [Char]
</span><a href="Data.OldList.html#unwords"><span class="hs-identifier hs-var hs-var">unwords</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-1439"></span><span class="annot"><a href="Data.OldList.html#unwords"><span class="hs-identifier hs-var">unwords</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532183"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532183"><span class="hs-identifier hs-var">w</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532182"><span class="annot"><span class="annottext">[[Char]]
</span><a href="#local-6989586621679532182"><span class="hs-identifier hs-var">ws</span></a></span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532183"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[[Char]] -&gt; [Char]
</span><a href="#local-6989586621679532181"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[[Char]]
</span><a href="#local-6989586621679532182"><span class="hs-identifier hs-var">ws</span></a></span><span>
</span><span id="line-1440"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1441"></span><span>    </span><span id="local-6989586621679532181"><span class="annot"><span class="annottext">go :: [[Char]] -&gt; [Char]
</span><a href="#local-6989586621679532181"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-1442"></span><span>    </span><span class="annot"><a href="#local-6989586621679532181"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679532180"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532180"><span class="hs-identifier hs-var">v</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532179"><span class="annot"><span class="annottext">[[Char]]
</span><a href="#local-6989586621679532179"><span class="hs-identifier hs-var">vs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">' '</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; [Char] -&gt; [Char]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532180"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[[Char]] -&gt; [Char]
</span><a href="#local-6989586621679532181"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[[Char]]
</span><a href="#local-6989586621679532179"><span class="hs-identifier hs-var">vs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1443"></span><span>
</span><span id="line-1444"></span><span class="hs-comment">-- In general, the foldr-based version is probably slightly worse</span><span>
</span><span id="line-1445"></span><span class="hs-comment">-- than the HBC version, because it adds an extra space and then takes</span><span>
</span><span id="line-1446"></span><span class="hs-comment">-- it back off again. But when it fuses, it reduces allocation. How much</span><span>
</span><span id="line-1447"></span><span class="hs-comment">-- depends entirely on the average word length--it's most effective when</span><span>
</span><span id="line-1448"></span><span class="hs-comment">-- the words are on the short side.</span><span>
</span><span id="line-1449"></span><span class="hs-pragma">{-# RULES</span><span>
</span><span id="line-1450"></span><span class="annot"><span class="hs-pragma">&quot;unwords&quot;</span></span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">~</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532178"><span class="annot"><a href="#local-6989586621679532178"><span class="hs-pragma hs-var">ws</span></a></span></span><span> </span><span class="hs-pragma">.</span><span>
</span><span id="line-1451"></span><span>   </span><span class="annot"><a href="Data.OldList.html#unwords"><span class="hs-pragma hs-type">unwords</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532178"><span class="hs-pragma hs-type">ws</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="Data.OldList.html#tailUnwords"><span class="hs-pragma hs-type">tailUnwords</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="GHC.Base.html#foldr"><span class="hs-pragma hs-type">foldr</span></a></span><span> </span><span class="annot"><a href="Data.OldList.html#unwordsFB"><span class="hs-pragma hs-type">unwordsFB</span></a></span><span> </span><span class="annot"><span class="hs-pragma">&quot;&quot;</span></span><span> </span><span class="annot"><a href="#local-6989586621679532178"><span class="hs-pragma hs-type">ws</span></a></span><span class="hs-pragma">)</span><span>
</span><span id="line-1452"></span><span class="annot"><span class="hs-pragma">&quot;unwordsList&quot;</span></span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679532175"><span class="annot"><a href="#local-6989586621679532175"><span class="hs-pragma hs-var">ws</span></a></span></span><span> </span><span class="hs-pragma">.</span><span>
</span><span id="line-1453"></span><span>   </span><span class="annot"><a href="Data.OldList.html#tailUnwords"><span class="hs-pragma hs-type">tailUnwords</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="GHC.Base.html#foldr"><span class="hs-pragma hs-type">foldr</span></a></span><span> </span><span class="annot"><a href="Data.OldList.html#unwordsFB"><span class="hs-pragma hs-type">unwordsFB</span></a></span><span> </span><span class="annot"><span class="hs-pragma">&quot;&quot;</span></span><span> </span><span class="annot"><a href="#local-6989586621679532175"><span class="hs-pragma hs-type">ws</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="Data.OldList.html#unwords"><span class="hs-pragma hs-type">unwords</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532175"><span class="hs-pragma hs-type">ws</span></a></span><span>
</span><span id="line-1454"></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-1455"></span><span>
</span><span id="line-1456"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#tailUnwords"><span class="hs-pragma hs-type">tailUnwords</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-1457"></span><span class="annot"><a href="Data.OldList.html#tailUnwords"><span class="hs-identifier hs-type">tailUnwords</span></a></span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-1458"></span><span id="tailUnwords"><span class="annot"><span class="annottext">tailUnwords :: [Char] -&gt; [Char]
</span><a href="Data.OldList.html#tailUnwords"><span class="hs-identifier hs-var hs-var">tailUnwords</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1459"></span><span class="annot"><a href="Data.OldList.html#tailUnwords"><span class="hs-identifier hs-var">tailUnwords</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679532174"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532174"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532174"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-1460"></span><span>
</span><span id="line-1461"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.OldList.html#unwordsFB"><span class="hs-pragma hs-type">unwordsFB</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-1462"></span><span class="annot"><a href="Data.OldList.html#unwordsFB"><span class="hs-identifier hs-type">unwordsFB</span></a></span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-1463"></span><span id="unwordsFB"><span class="annot"><span class="annottext">unwordsFB :: [Char] -&gt; [Char] -&gt; [Char]
</span><a href="Data.OldList.html#unwordsFB"><span class="hs-identifier hs-var hs-var">unwordsFB</span></a></span></span><span> </span><span id="local-6989586621679532173"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532173"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621679532172"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532172"><span class="hs-identifier hs-var">r</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">' '</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; [Char] -&gt; [Char]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532173"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679532172"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-1466"></span><span class="hs-comment">{- A &quot;SnocBuilder&quot; is a version of Chris Okasaki's banker's queue that supports
toListSB instead of uncons. In single-threaded use, its performance
characteristics are similar to John Hughes's functional difference lists, but
likely somewhat worse. In heavily persistent settings, however, it does much
better, because it takes advantage of sharing. The banker's queue guarantees
(amortized) O(1) snoc and O(1) uncons, meaning that we can think of toListSB as
an O(1) conversion to a list-like structure a constant factor slower than
normal lists--we pay the O(n) cost incrementally as we consume the list. Using
functional difference lists, on the other hand, we would have to pay the whole
cost up front for each output list. -}</span><span>
</span><span id="line-1476"></span><span>
</span><span id="line-1477"></span><span class="hs-comment">{- We store a front list, a rear list, and the length of the queue.  Because we
only snoc onto the queue and never uncons, we know it's time to rotate when the
length of the queue plus 1 is a power of 2. Note that we rely on the value of
the length field only for performance.  In the unlikely event of overflow, the
performance will suffer but the semantics will remain correct.  -}</span><span>
</span><span id="line-1482"></span><span>
</span><span id="line-1483"></span><span class="hs-keyword">data</span><span> </span><span id="SnocBuilder"><span class="annot"><a href="Data.OldList.html#SnocBuilder"><span class="hs-identifier hs-var">SnocBuilder</span></a></span></span><span> </span><span id="local-6989586621679532171"><span class="annot"><a href="#local-6989586621679532171"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="SnocBuilder"><span class="annot"><a href="Data.OldList.html#SnocBuilder"><span class="hs-identifier hs-var">SnocBuilder</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532171"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679532171"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1484"></span><span>
</span><span id="line-1485"></span><span class="hs-comment">{- Smart constructor that rotates the builder when lp is one minus a power of
2. Does not rotate very small builders because doing so is not worth the
trouble. The lp &lt; 255 test goes first because the power-of-2 test gives awful
branch prediction for very small n (there are 5 powers of 2 between 1 and
16). Putting the well-predicted lp &lt; 255 test first avoids branching on the
power-of-2 test until powers of 2 have become sufficiently rare to be predicted
well. -}</span><span>
</span><span id="line-1492"></span><span>
</span><span id="line-1493"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.OldList.html#sb"><span class="hs-pragma hs-type">sb</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-1494"></span><span id="local-6989586621679533027"><span class="annot"><a href="Data.OldList.html#sb"><span class="hs-identifier hs-type">sb</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533027"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533027"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.OldList.html#SnocBuilder"><span class="hs-identifier hs-type">SnocBuilder</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533027"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-1495"></span><span id="sb"><span class="annot"><span class="annottext">sb :: forall a. Word -&gt; [a] -&gt; [a] -&gt; SnocBuilder a
</span><a href="Data.OldList.html#sb"><span class="hs-identifier hs-var hs-var">sb</span></a></span></span><span> </span><span id="local-6989586621679532157"><span class="annot"><span class="annottext">Word
</span><a href="#local-6989586621679532157"><span class="hs-identifier hs-var">lp</span></a></span></span><span> </span><span id="local-6989586621679532156"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532156"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679532155"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532155"><span class="hs-identifier hs-var">r</span></a></span></span><span>
</span><span id="line-1496"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word
</span><a href="#local-6989586621679532157"><span class="hs-identifier hs-var">lp</span></a></span><span> </span><span class="annot"><span class="annottext">Word -&gt; Word -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Word
</span><span class="hs-number">255</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word
</span><a href="#local-6989586621679532157"><span class="hs-identifier hs-var">lp</span></a></span><span> </span><span class="annot"><span class="annottext">Word -&gt; Word -&gt; Word
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word
</span><a href="#local-6989586621679532157"><span class="hs-identifier hs-var">lp</span></a></span><span> </span><span class="annot"><span class="annottext">Word -&gt; Word -&gt; Word
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word -&gt; Word -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Word
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word -&gt; [a] -&gt; [a] -&gt; SnocBuilder a
forall a. Word -&gt; [a] -&gt; [a] -&gt; SnocBuilder a
</span><a href="Data.OldList.html#SnocBuilder"><span class="hs-identifier hs-var">SnocBuilder</span></a></span><span> </span><span class="annot"><span class="annottext">Word
</span><a href="#local-6989586621679532157"><span class="hs-identifier hs-var">lp</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532156"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532155"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-1497"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word -&gt; [a] -&gt; [a] -&gt; SnocBuilder a
forall a. Word -&gt; [a] -&gt; [a] -&gt; SnocBuilder a
</span><a href="Data.OldList.html#SnocBuilder"><span class="hs-identifier hs-var">SnocBuilder</span></a></span><span> </span><span class="annot"><span class="annottext">Word
</span><a href="#local-6989586621679532157"><span class="hs-identifier hs-var">lp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532156"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a]
forall a. [a] -&gt; [a]
</span><a href="GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532155"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1498"></span><span>
</span><span id="line-1499"></span><span class="hs-comment">-- The empty builder</span><span>
</span><span id="line-1500"></span><span>
</span><span id="line-1501"></span><span id="local-6989586621679533058"><span class="annot"><a href="Data.OldList.html#emptySB"><span class="hs-identifier hs-type">emptySB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.OldList.html#SnocBuilder"><span class="hs-identifier hs-type">SnocBuilder</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533058"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-1502"></span><span id="emptySB"><span class="annot"><span class="annottext">emptySB :: forall a. SnocBuilder a
</span><a href="Data.OldList.html#emptySB"><span class="hs-identifier hs-var hs-var">emptySB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word -&gt; [a] -&gt; [a] -&gt; SnocBuilder a
forall a. Word -&gt; [a] -&gt; [a] -&gt; SnocBuilder a
</span><a href="Data.OldList.html#SnocBuilder"><span class="hs-identifier hs-var">SnocBuilder</span></a></span><span> </span><span class="annot"><span class="annottext">Word
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1503"></span><span>
</span><span id="line-1504"></span><span class="hs-comment">-- Add an element to the end of a queue.</span><span>
</span><span id="line-1505"></span><span>
</span><span id="line-1506"></span><span id="local-6989586621679533059"><span class="annot"><a href="Data.OldList.html#snocSB"><span class="hs-identifier hs-type">snocSB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.OldList.html#SnocBuilder"><span class="hs-identifier hs-type">SnocBuilder</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533059"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679533059"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.OldList.html#SnocBuilder"><span class="hs-identifier hs-type">SnocBuilder</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533059"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-1507"></span><span id="snocSB"><span class="annot"><span class="annottext">snocSB :: forall a. SnocBuilder a -&gt; a -&gt; SnocBuilder a
</span><a href="Data.OldList.html#snocSB"><span class="hs-identifier hs-var hs-var">snocSB</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.OldList.html#SnocBuilder"><span class="hs-identifier hs-type">SnocBuilder</span></a></span><span> </span><span id="local-6989586621679532151"><span class="annot"><span class="annottext">Word
</span><a href="#local-6989586621679532151"><span class="hs-identifier hs-var">lp</span></a></span></span><span> </span><span id="local-6989586621679532150"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532150"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679532149"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532149"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679532148"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532148"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word -&gt; [a] -&gt; [a] -&gt; SnocBuilder a
forall a. Word -&gt; [a] -&gt; [a] -&gt; SnocBuilder a
</span><a href="Data.OldList.html#sb"><span class="hs-identifier hs-var">sb</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word
</span><a href="#local-6989586621679532151"><span class="hs-identifier hs-var">lp</span></a></span><span> </span><span class="annot"><span class="annottext">Word -&gt; Word -&gt; Word
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532150"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679532148"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532149"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1508"></span><span>
</span><span id="line-1509"></span><span class="hs-comment">-- Convert a builder to a list</span><span>
</span><span id="line-1510"></span><span>
</span><span id="line-1511"></span><span id="local-6989586621679533062"><span class="annot"><a href="Data.OldList.html#toListSB"><span class="hs-identifier hs-type">toListSB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.OldList.html#SnocBuilder"><span class="hs-identifier hs-type">SnocBuilder</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679533062"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679533062"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-1512"></span><span id="toListSB"><span class="annot"><span class="annottext">toListSB :: forall a. SnocBuilder a -&gt; [a]
</span><a href="Data.OldList.html#toListSB"><span class="hs-identifier hs-var hs-var">toListSB</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.OldList.html#SnocBuilder"><span class="hs-identifier hs-type">SnocBuilder</span></a></span><span> </span><span class="annot"><span class="annottext">Word
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679532147"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532147"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679532146"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532146"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532147"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a]
forall a. [a] -&gt; [a]
</span><a href="GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679532146"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-1513"></span></pre></body></html>